Elvis and null-safe access

This commit is contained in:
Andrey Breslav
2010-12-10 18:55:32 +03:00
parent 1fe0c77302
commit e0f81e71b1
3 changed files with 10 additions and 4 deletions
+7 -1
View File
@@ -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
;
+2
View File
@@ -25,6 +25,8 @@ NoEscapeString : /* """-quoted string */;
=>
..
?
?:
?.
*/
/* Keywords:
+1 -3
View File
@@ -41,6 +41,4 @@ tupleType
: "(" parameter{","} ")" // tuple with named entries, the names do not affect assignment compatibility
;
////////////////////////////////////////
////////////////////////////////////////