mirror of
https://github.com/twiglet/cs2j.git
synced 2025-01-18 13:15:17 +01:00
no need for SEP now that types are wrapped
This commit is contained in:
parent
80d4d0685d
commit
f3e1ca6e0b
@ -495,7 +495,7 @@ unary_expression:
|
||||
;
|
||||
cast_expression:
|
||||
//'(' type ')' unary_expression ;
|
||||
'(' type ')' unary_expression -> ^(CAST_EXPR type SEP unary_expression);
|
||||
'(' type ')' unary_expression -> ^(CAST_EXPR type unary_expression);
|
||||
assignment_operator:
|
||||
'=' | '+=' | '-=' | '*=' | '/=' | '%=' | '&=' | '|=' | '^=' | '<<=' | '>' '>=' ;
|
||||
pre_increment_expression:
|
||||
@ -533,8 +533,8 @@ relational_expression:
|
||||
| (i='is' t=non_nullable_type -> ^(INSTANCEOF[$i.Token,"instanceof"] $relational_expression $t)
|
||||
| i1='as' t1=non_nullable_type -> ^(COND_EXPR[$i1.Token, "?:"]
|
||||
^(INSTANCEOF[$i1.Token,"instanceof"] { (CommonTree)adaptor.DupTree($relational_expression.tree) } { (CommonTree)adaptor.DupTree($t1.tree) } )
|
||||
^(CAST_EXPR[$i1.Token, "(cast)"] { (CommonTree)adaptor.DupTree($t1.tree) } SEP[$i1.Token, "SEP"] { (CommonTree)adaptor.DupTree($relational_expression.tree) })
|
||||
^(CAST_EXPR[$i1.Token, "(cast)"] { (CommonTree)adaptor.DupTree($t1.tree) } SEP[$i1.Token, "SEP"] NULL[$i1.Token, "null"])))
|
||||
^(CAST_EXPR[$i1.Token, "(cast)"] { (CommonTree)adaptor.DupTree($t1.tree) } { (CommonTree)adaptor.DupTree($relational_expression.tree) })
|
||||
^(CAST_EXPR[$i1.Token, "(cast)"] { (CommonTree)adaptor.DupTree($t1.tree) } NULL[$i1.Token, "null"])))
|
||||
)* ;
|
||||
equality_expression:
|
||||
relational_expression
|
||||
|
@ -403,7 +403,7 @@ unary_expression:
|
||||
| addressof_expression
|
||||
;
|
||||
cast_expression:
|
||||
'(' type ')' unary_expression ;
|
||||
^(CAST_EXPR type unary_expression ) -> cast_expr(type= { $type.st}, exp = { $unary_expression.st});
|
||||
assignment_operator:
|
||||
'=' | '+=' | '-=' | '*=' | '/=' | '%=' | '&=' | '|=' | '^=' | '<<=' | '>' '>=' ;
|
||||
pre_increment_expression:
|
||||
|
@ -329,7 +329,7 @@ unary_expression:
|
||||
//('(' arguments ')' ('[' | '.' | '(')) => primary_or_array_creation_expression
|
||||
|
||||
//(cast_expression) => cast_expression
|
||||
^(CAST_EXPR type SEP unary_expression)
|
||||
^(CAST_EXPR type unary_expression)
|
||||
| primary_or_array_creation_expression
|
||||
| '+' unary_expression
|
||||
| '-' unary_expression
|
||||
|
@ -86,5 +86,9 @@ modifiers(mods) ::= "<if(mods)><mods; separator=\" \"> <endif>"
|
||||
extends(types) ::= "<if(types)>extends <types; separator=\",\"><endif>"
|
||||
imps(types) ::= "<if(types)>implements <types; separator=\",\"><endif>"
|
||||
|
||||
// ******* EXPRESSIONS *******
|
||||
|
||||
cast_expr(type, exp) ::= "(<type>)<exp>"
|
||||
|
||||
// ******* UTILITY ***********
|
||||
string(payload) ::= "<payload>"
|
Loading…
x
Reference in New Issue
Block a user