Local declarations
This commit is contained in:
@@ -3,7 +3,6 @@ expression
|
||||
: literalConstant
|
||||
: functionLiteral
|
||||
: tupleLiteral
|
||||
: "null"
|
||||
: "this" ("<" type ">")?
|
||||
: expressionWithPrecedences
|
||||
: match
|
||||
@@ -25,6 +24,7 @@ literalConstant
|
||||
: IntegerLiteral
|
||||
: HexadecimalLiteral
|
||||
: CharacterLiteral
|
||||
: "null"
|
||||
;
|
||||
|
||||
declaration
|
||||
@@ -83,14 +83,14 @@ binaryOperation // Decreasing precedence
|
||||
: ".."
|
||||
: SimpleName
|
||||
: "?:"
|
||||
: "in" : "is" : "!in" : "!is" : "as"
|
||||
: "in" : "is" : "!in" : "!is" : "as" : ":"
|
||||
: "<" : ">" : ">=" : "<="
|
||||
: "!=" : "==" : "===" : "!=="
|
||||
// No | & ^ ~
|
||||
: "&&"
|
||||
: "||"
|
||||
: "match"
|
||||
: "->"
|
||||
: ":"
|
||||
: assignmentOperator
|
||||
;
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ pattern
|
||||
: tuplePattern
|
||||
: bindingPattern // we allow non-linear patterns
|
||||
: decomposerPattern // labeled components are allowed
|
||||
: arrowPattern
|
||||
;
|
||||
|
||||
constantPattern
|
||||
@@ -29,4 +30,8 @@ bindingPattern
|
||||
|
||||
decomposerPattern
|
||||
: userType tuplePattern?
|
||||
;
|
||||
|
||||
arrowPattern
|
||||
: pattern "->" pattern
|
||||
;
|
||||
Reference in New Issue
Block a user