Exemple #1
0
void Parser::VarDecTail(ExprRec& var) {
	switch (NextToken()) {
	case COMMA:
		Match(COMMA);
		Match(ID);
		code.DefineVar(var);
		VarDecTail(var);
		break;
	case SEMICOLON:
		break;
	default:
		SyntaxError(NextToken(), "VarDecTail");
	}
}
Exemple #2
0
void Parser::VarDecList(ExprRec& var) {
	Match(ID);
	code.DefineVar(var); /*** CODE ***/
	VarDecTail(var);
}