Merge: new `with` statement
[nit.git] / src / parser / parser_abs.nit
index bc9b980..ef6b0d2 100644 (file)
@@ -154,6 +154,9 @@ end
 class TKwlabel
        super Token
 end
+class TKwwith
+       super Token
+end
 class TKwdebug
        super Token
 end
@@ -309,7 +312,6 @@ class AVisibility super Prod end
 class AClassdef super Prod end
 class AClasskind super Prod end
 class AFormaldef super Prod end
-class ASuperclass super Prod end
 class APropdef super Prod end
 class AMethid super Prod end
 class ASignature super Prod end
@@ -383,9 +385,7 @@ class AStdClassdef
        var n_classkind: AClasskind is writable, noinit
        var n_id: nullable TClassid = null is writable
        var n_formaldefs: List[AFormaldef] = new List[AFormaldef]
-       var n_annotations: nullable AAnnotations = null is writable
        var n_extern_code_block: nullable AExternCodeBlock = null is writable
-       var n_superclasses: List[ASuperclass] = new List[ASuperclass]
        var n_propdefs: List[APropdef] = new List[APropdef]
        var n_kwend: TKwend is writable, noinit
 end
@@ -425,12 +425,6 @@ class AFormaldef
        var n_type: nullable AType = null is writable
        var n_annotations: nullable AAnnotations = null is writable
 end
-class ASuperclass
-       super ASuperclass
-       var n_kwsuper: TKwsuper is writable, noinit
-       var n_type: AType is writable, noinit
-       var n_annotations: nullable AAnnotations = null is writable
-end
 class AAttrPropdef
        super APropdef
        var n_doc: nullable ADoc = null is writable
@@ -473,6 +467,26 @@ class AMethPropdef
        var n_extern_code_block: nullable AExternCodeBlock = null is writable
        var n_block: nullable AExpr = null is writable
 end
+class ASuperPropdef
+       super APropdef
+       var n_doc: nullable ADoc = null is writable
+       var n_kwredef: nullable TKwredef = null is writable
+       var n_visibility: AVisibility is writable, noinit
+       var n_kwsuper: TKwsuper is writable, noinit
+       var n_type: AType is writable, noinit
+       var n_annotations: nullable AAnnotations = null is writable
+end
+class AAnnotPropdef
+       super APropdef
+       var n_doc: nullable ADoc = null is writable
+       var n_kwredef: nullable TKwredef = null is writable
+       var n_visibility: nullable AVisibility = null is writable
+       var n_atid: AAtid is writable, noinit
+       var n_opar: nullable TOpar = null is writable
+       var n_args: List[AExpr] = new List[AExpr]
+       var n_cpar: nullable TCpar = null is writable
+       var n_annotations: nullable AAnnotations = null is writable
+end
 class AIdMethid
        super AMethid
        var n_id: TId is writable, noinit
@@ -586,7 +600,7 @@ class ABlockExpr
 end
 class AVardeclExpr
        super AExpr
-       var n_kwvar: TKwvar is writable, noinit
+       var n_kwvar: nullable TKwvar = null is writable
        var n_id: TId is writable, noinit
        var n_type: nullable AType = null is writable
        var n_assign: nullable TAssign = null is writable
@@ -657,6 +671,14 @@ class AForExpr
        var n_block: nullable AExpr = null is writable
        var n_label: nullable ALabel = null is writable
 end
+class AWithExpr
+       super AExpr
+       var n_kwwith: TKwwith is writable, noinit
+       var n_expr: AExpr is writable, noinit
+       var n_kwdo: TKwdo is writable, noinit
+       var n_block: nullable AExpr = null is writable
+       var n_label: nullable ALabel = null is writable
+end
 class AAssertExpr
        super AExpr
        var n_kwassert: TKwassert is writable, noinit