Accept name constants in the grammar
This commit is contained in:
parent
b6e525d935
commit
33e835b58d
3 changed files with 18 additions and 0 deletions
|
|
@ -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 ************/
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue