37 while (!token.
isEOF()) {
38 if (token.
isDel(
'{')) {
40 }
else if (token.
isDel(
'}')) {
41 if (--level == 0)
return;
virtual ~CompoundStatement()
std::shared_ptr< MacroStream > tokens
virtual void execute(const Parser &)
Execute.
Interface for abstract language parser.
virtual void run(TokenStream *ts) const =0
Read statements and parse.
Interface for statements.
Abstract interface for a stream of input tokens.
virtual Token readToken()=0
Read single token from stream.
Representation of a single input token.
bool isDel(char del) const
Test for delimiter.
bool isEOF() const
Test for end of file.
int getLine() const
Return the token's line number.
const std::string & getFile() const
Return the token's file name.