bool parserCls::compoundStmt(tokenContainCls &tcs1 ,int & a2) {bool etlnoc, bb2 = false ; EinstructionWord est;inDo++; do{a2++;callStmt(etlnoc,est); }while((est!=EndInstr)&&(est!=EndOfFileInstr)&&(est!=LabelInstr)); if(est != EndInstr) errorCompound(tcs1); else bb2 = true ; inDo--;return bb2; }
// }}} // {{{ stmt std::unique_ptr<Stmt> FlowParser::stmt() { FNTRACE(); switch (token()) { case FlowToken::If: return ifStmt(); case FlowToken::Begin: return compoundStmt(); case FlowToken::Ident: return callStmt(); case FlowToken::Semicolon: { FlowLocation sloc(location()); nextToken(); return std::make_unique<CompoundStmt>(sloc.update(end())); } default: reportError("Unexpected token '%s'. Expected a statement instead.", token().c_str()); return nullptr; } }
ASTNode* Parser::statement() { _stmtNum++; if (isKeyword("while")) { return whileStmt(); } if (isKeyword("if")) { return ifStmt(); } if (isKeyword("call")) { return callStmt(); } if (isName()) { return assignStmt(); } throw ParseException(_stmtNum, _token, "Unable to parse statement"); }