Merge: Some gammar improvements
[nit.git] / src / parser / parser_nodes.nit
index 8793a00..a4d6d44 100644 (file)
@@ -1027,6 +1027,9 @@ class AAttrPropdef
 
        # The initial value, if any
        var n_expr: nullable AExpr = null is writable
+
+       var n_block: nullable AExpr = null is writable
+
        redef fun hot_location
        do
                return n_id2.location
@@ -1344,14 +1347,19 @@ abstract class ALabelable
        var n_label: nullable ALabel = null is writable
 end
 
-# A `break` statement.
-class ABreakExpr
+# A `break` or a `continue`
+abstract class AEscapeExpr
        super AExpr
        super ALabelable
-       var n_kwbreak: TKwbreak is writable, noinit
        var n_expr: nullable AExpr = null is writable
 end
 
+# A `break` statement.
+class ABreakExpr
+       super AEscapeExpr
+       var n_kwbreak: TKwbreak is writable, noinit
+end
+
 # An `abort` statement
 class AAbortExpr
        super AExpr
@@ -1360,10 +1368,8 @@ end
 
 # A `continue` statement
 class AContinueExpr
-       super AExpr
-       super ALabelable
+       super AEscapeExpr
        var n_kwcontinue: nullable TKwcontinue = null is writable
-       var n_expr: nullable AExpr = null is writable
 end
 
 # A `do` statement
@@ -1910,6 +1916,15 @@ class ATypeExpr
        var n_type: AType is writable, noinit
 end
 
+# A special expression that encapsulates a method identifier
+# Can only be found in special construction like arguments of annotations.
+class AMethidExpr
+       super AExpr
+       # The receiver, is any
+       var n_expr: AExpr is writable, noinit
+       var n_id: AMethid is writable, noinit
+end
+
 # A special expression that encapsulate an annotation
 # Can only be found in special construction like arguments of annotations.
 class AAtExpr