added class pointer casts. Due to grammar problems the type has to be put into parentheses to get the class token out of the global parsing namespace:
class<Actor> myclass = (class<Actor>)(GetClass());
This commit is contained in:
parent
022228d8a9
commit
3bcd85eb8a
8 changed files with 167 additions and 0 deletions
|
|
@ -1080,6 +1080,14 @@ primary(X) ::= primary(A) LPAREN func_expr_list(B) RPAREN. [DOT] // Function ca
|
|||
expr->Parameters = B;
|
||||
X = expr;
|
||||
}
|
||||
primary(X) ::= LPAREN CLASS LT IDENTIFIER(A) GT RPAREN LPAREN func_expr_list(B) RPAREN. [DOT] // class type cast
|
||||
{
|
||||
NEW_AST_NODE(ClassCast, expr, A);
|
||||
expr->Operation = PEX_ClassCast;
|
||||
expr->ClassName = ENamedName(A.Int);
|
||||
expr->Parameters = B;
|
||||
X = expr;
|
||||
}
|
||||
primary(X) ::= primary(A) LBRACKET expr(B) RBRACKET. [DOT] // Array access
|
||||
{
|
||||
NEW_AST_NODE(ExprBinary, expr, B);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue