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