Accept name constants in the grammar

This commit is contained in:
Randy Heit 2013-09-10 21:56:13 -05:00
commit 33e835b58d
3 changed files with 18 additions and 0 deletions

View file

@ -1141,6 +1141,14 @@ constant(X) ::= FLOATCONST(A).
floatconst->DoubleVal = A.Float;
X = floatconst;
}
constant(X) ::= NAMECONST(A).
{
NEW_AST_NODE(ExprConstant, floatconst, A);
floatconst->Operation = PEX_ConstValue;
floatconst->Type = TypeName;
floatconst->IntVal = A.Int;
X = floatconst;
}
/************ Statements ************/