expect(")");
left = parexpr;
}
+ else if(isdigit(token[0]) || token=="true" || token=="false")
+ {
+ RefPtr<Literal> literal = new Literal;
+ literal->token = parse_token();
+ left = literal;
+ }
else if(is_identifier(token))
{
RefPtr<VariableReference> var = new VariableReference;
unary->expression = parse_expression(oper->precedence);
left = unary;
}
- else if(isdigit(token[0]))
- {
- RefPtr<Literal> literal = new Literal;
- literal->token = parse_token();
- left = literal;
- }
else
throw runtime_error(format("Parse error at '%s': expected an expression", token));
}