- added 'null' token to the ZScript parser which is needed for null pointers.
- removed function declaration parser from DECORATE because it is not needed anymore. - fixed: comparison operators could not handle names.
This commit is contained in:
parent
f6b3cdc23d
commit
665d752686
7 changed files with 23 additions and 272 deletions
|
|
@ -956,6 +956,13 @@ primary(X) ::= IDENTIFIER(A).
|
|||
expr->Type = NULL;
|
||||
X = expr;
|
||||
}
|
||||
primary(X) ::= NULL(T).
|
||||
{
|
||||
NEW_AST_NODE(Expression, expr, T);
|
||||
expr->Operation = PEX_Null;
|
||||
expr->Type = NULL;
|
||||
X = expr;
|
||||
}
|
||||
primary(X) ::= SUPER(T).
|
||||
{
|
||||
NEW_AST_NODE(Expression, expr, T);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ xx(Nil, )
|
|||
|
||||
xx(ID, )
|
||||
xx(Super, )
|
||||
xx(Null, )
|
||||
xx(Self, )
|
||||
xx(ConstValue, )
|
||||
xx(FuncCall, )
|
||||
|
|
|
|||
|
|
@ -153,6 +153,7 @@ static void InitTokenMap()
|
|||
TOKENDEF (TK_Out, ZCC_OUT);
|
||||
TOKENDEF (TK_Optional, ZCC_OPTIONAL);
|
||||
TOKENDEF (TK_Super, ZCC_SUPER);
|
||||
TOKENDEF (TK_Null, ZCC_NULL);
|
||||
TOKENDEF (TK_Self, ZCC_SELF);
|
||||
TOKENDEF ('~', ZCC_TILDE);
|
||||
TOKENDEF ('!', ZCC_BANG);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue