Local declarations

This commit is contained in:
Andrey Breslav
2010-12-29 18:08:47 +03:00
parent 88b5c26fe3
commit 01297cc926
12 changed files with 321 additions and 61 deletions
+3 -3
View File
@@ -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
;
+5
View File
@@ -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
;