Elvis and null-safe access
This commit is contained in:
@@ -49,7 +49,12 @@ expressionWithPrecedences // See the precedence table, everything associates to
|
||||
;
|
||||
|
||||
memberAccessExpression
|
||||
: (expression ".")? memberAccess
|
||||
: (expression accessOp)? memberAccess
|
||||
;
|
||||
|
||||
accessOp
|
||||
: "."
|
||||
: "?."
|
||||
;
|
||||
|
||||
typingExpression
|
||||
@@ -78,6 +83,7 @@ binaryOperation // Decreasing precedence
|
||||
// No | & ^ ~
|
||||
: "&&"
|
||||
: "||"
|
||||
: "?:"
|
||||
// assignments
|
||||
;
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ NoEscapeString : /* """-quoted string */;
|
||||
=>
|
||||
..
|
||||
?
|
||||
?:
|
||||
?.
|
||||
*/
|
||||
|
||||
/* Keywords:
|
||||
|
||||
@@ -41,6 +41,4 @@ tupleType
|
||||
: "(" parameter{","} ")" // tuple with named entries, the names do not affect assignment compatibility
|
||||
;
|
||||
|
||||
|
||||
////////////////////////////////////////
|
||||
|
||||
////////////////////////////////////////
|
||||
Reference in New Issue
Block a user