mirror of
https://github.com/twiglet/cs2j.git
synced 2025-01-18 13:15:17 +01:00
No UNARY_EXPR in PrettyPrint, actually create unary expressions :(
This commit is contained in:
parent
1f2374d213
commit
b48d69e443
@ -524,8 +524,8 @@ additive_expression:
|
|||||||
multiplicative_expression (('+'|'-')^ multiplicative_expression)* ;
|
multiplicative_expression (('+'|'-')^ multiplicative_expression)* ;
|
||||||
// >> check needed (no whitespace)
|
// >> check needed (no whitespace)
|
||||||
shift_expression:
|
shift_expression:
|
||||||
a1=additive_expression ((so='<<' a3=additive_expression -> ^($so $a1 $a3))
|
(a1=additive_expression -> $a1) ((so='<<' a3=additive_expression -> ^($so $shift_expression $a3))
|
||||||
| ('>' '>' a2=additive_expression -> ^(RIGHT_SHIFT $a1 $a2))
|
| ('>' '>' a2=additive_expression -> ^(RIGHT_SHIFT $shift_expression $a2))
|
||||||
)* ;
|
)* ;
|
||||||
relational_expression:
|
relational_expression:
|
||||||
(s1=shift_expression -> $s1)
|
(s1=shift_expression -> $s1)
|
||||||
|
@ -351,7 +351,7 @@ type
|
|||||||
List<string> stars = new List<string>();
|
List<string> stars = new List<string>();
|
||||||
string opt = null;
|
string opt = null;
|
||||||
}:
|
}:
|
||||||
^(TYPE (tp=predefined_type {nm=$tp.st;} | tn=type_name {nm=$tn.st;}) rank_specifiers ('*' { stars.Add("*");})* ('?' { opt = "?";} )?) -> type(name={ nm }, stars={ stars }, rs={ $rank_specifiers.st }, opt={ opt })
|
^(TYPE (tp=predefined_type {nm=$tp.st;} | tn=type_name {nm=$tn.st;}) rank_specifiers? ('*' { stars.Add("*");})* ('?' { opt = "?";} )?) -> type(name={ nm }, stars={ stars }, rs={ $rank_specifiers.st }, opt={ opt })
|
||||||
;
|
;
|
||||||
non_nullable_type:
|
non_nullable_type:
|
||||||
type -> { $type.st } ;
|
type -> { $type.st } ;
|
||||||
@ -440,7 +440,7 @@ non_assignment_expression:
|
|||||||
| ^('*' non_assignment_expression non_assignment_expression)
|
| ^('*' non_assignment_expression non_assignment_expression)
|
||||||
| ^('/' non_assignment_expression non_assignment_expression)
|
| ^('/' non_assignment_expression non_assignment_expression)
|
||||||
| ^('%' non_assignment_expression non_assignment_expression)
|
| ^('%' non_assignment_expression non_assignment_expression)
|
||||||
| ^(UNARY_EXPR unary_expression) -> { $unary_expression.st }
|
| unary_expression -> { $unary_expression.st }
|
||||||
;
|
;
|
||||||
|
|
||||||
///////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////
|
||||||
@ -1067,8 +1067,8 @@ literal:
|
|||||||
| Character_literal
|
| Character_literal
|
||||||
| STRINGLITERAL
|
| STRINGLITERAL
|
||||||
| Verbatim_string_literal
|
| Verbatim_string_literal
|
||||||
| TRUE
|
| TRUE -> string(payload={"true"})
|
||||||
| FALSE
|
| FALSE -> string(payload={"false"})
|
||||||
| NULL -> string(payload={"null"})
|
| NULL -> string(payload={"null"})
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -290,7 +290,7 @@ type_arguments:
|
|||||||
type (',' type)* ;
|
type (',' type)* ;
|
||||||
|
|
||||||
type:
|
type:
|
||||||
^(TYPE (predefined_type | type_name) rank_specifiers '*'* '?'?);
|
^(TYPE (predefined_type | type_name) rank_specifiers? '*'* '?'?);
|
||||||
non_nullable_type:
|
non_nullable_type:
|
||||||
type;
|
type;
|
||||||
non_array_type:
|
non_array_type:
|
||||||
@ -353,7 +353,6 @@ pointer_indirection_expression:
|
|||||||
addressof_expression:
|
addressof_expression:
|
||||||
'&' unary_expression ;
|
'&' unary_expression ;
|
||||||
|
|
||||||
|
|
||||||
non_assignment_expression:
|
non_assignment_expression:
|
||||||
//'non ASSIGNment'
|
//'non ASSIGNment'
|
||||||
(anonymous_function_signature '=>') => lambda_expression
|
(anonymous_function_signature '=>') => lambda_expression
|
||||||
|
Loading…
x
Reference in New Issue
Block a user