Definition at line 151 of file SkSLParser.cpp.
◆ Checkpoint()
SkSL::Parser::Checkpoint::Checkpoint |
( |
Parser * |
p | ) |
|
|
inline |
Definition at line 153 of file SkSLParser.cpp.
154 Context& context = fParser->fCompiler.
context();
155 fPushbackCheckpoint = fParser->fPushback;
157 fOldErrorReporter = context.fErrors;
158 fOldEncounteredFatalError = fParser->fEncounteredFatalError;
160 context.setErrorReporter(&fErrorReporter);
161 }
Context & context() const
Checkpoint getCheckpoint() const
◆ ~Checkpoint()
SkSL::Parser::Checkpoint::~Checkpoint |
( |
| ) |
|
|
inline |
Definition at line 163 of file SkSLParser.cpp.
163 {
164 SkASSERTF(!fOldErrorReporter,
"Checkpoint was not accepted or rewound before destruction");
165 }
#define SkASSERTF(cond, fmt,...)
◆ accept()
void SkSL::Parser::Checkpoint::accept |
( |
| ) |
|
|
inline |
Definition at line 167 of file SkSLParser.cpp.
167 {
168 this->restoreErrorReporter();
169
170
171
172 fErrorReporter.forwardErrors(fParser);
173 }
◆ rewind()
void SkSL::Parser::Checkpoint::rewind |
( |
| ) |
|
|
inline |
Definition at line 175 of file SkSLParser.cpp.
175 {
176 this->restoreErrorReporter();
177 fParser->fPushback = fPushbackCheckpoint;
179 fParser->fEncounteredFatalError = fOldEncounteredFatalError;
180 }
void rewindToCheckpoint(Checkpoint checkpoint)
The documentation for this class was generated from the following file: