Merge branch 'annotations'
[nit.git] / src / parser / parser_abs.nit
index 8cd90b3..1aee132 100644 (file)
@@ -47,9 +47,6 @@ end
 class TKwenum
        super Token
 end
-class TKwspecial
-       super Token
-end
 class TKwend
        super Token
 end
@@ -263,6 +260,9 @@ end
 class TBang
        super Token
 end
+class TAt
+       super Token
+end
 class TClassid
        super Token
 end
@@ -278,9 +278,6 @@ end
 class TFloat
        super Token
 end
-class TChar
-       super Token
-end
 class TString
        super Token
 end
@@ -293,19 +290,29 @@ end
 class TEndString
        super Token
 end
-class TBadChar
+class TChar
        super Token
 end
 class TBadString
        super Token
 end
+class TBadChar
+       super Token
+end
+class TExternCodeSegment
+       super Token
+end
 class EOF
        super Token
-private init noinit do end
 end
 class AError
        super EOF
-private init noinit do end
+end
+class ALexerError
+       super AError
+end
+class AParserError
+       super AError
 end
 
 class AModule super Prod end
@@ -332,13 +339,20 @@ class AClosureId super Prod end
 class AModuleName super Prod end
 class AExternCalls super Prod end
 class AExternCall super Prod end
+class AInLanguage super Prod end
+class AExternCodeBlock super Prod end
 class AQualified super Prod end
 class ADoc super Prod end
+class AAnnotations super Prod end
+class AAnnotation super Prod end
+class AAtArg super Prod end
+class AAtid super Prod end
 
 class AModule
        super AModule
     readable var _n_moduledecl: nullable AModuledecl = null
     readable var _n_imports: List[AImport] = new List[AImport]
+    readable var _n_extern_code_blocks: List[AExternCodeBlock] = new List[AExternCodeBlock]
     readable var _n_classdefs: List[AClassdef] = new List[AClassdef]
 end
 class AModuledecl
@@ -346,12 +360,14 @@ class AModuledecl
     readable var _n_doc: nullable ADoc = null
     readable var _n_kwmodule: TKwmodule
     readable var _n_name: AModuleName
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class AStdImport
        super AImport
     readable var _n_visibility: AVisibility
     readable var _n_kwimport: TKwimport
     readable var _n_name: AModuleName
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class ANoImport
        super AImport
@@ -382,6 +398,8 @@ class AStdClassdef
     readable var _n_classkind: AClasskind
     readable var _n_id: nullable TClassid = null
     readable var _n_formaldefs: List[AFormaldef] = new List[AFormaldef]
+    readable var _n_annotations: nullable AAnnotations = null
+    readable var _n_extern_code_block: nullable AExternCodeBlock = null
     readable var _n_superclasses: List[ASuperclass] = new List[ASuperclass]
     readable var _n_propdefs: List[APropdef] = new List[APropdef]
     readable var _n_kwend: TKwend
@@ -414,17 +432,19 @@ end
 class AExternClasskind
        super AClasskind
     readable var _n_kwextern: TKwextern
+    readable var _n_kwclass: nullable TKwclass = null
 end
 class AFormaldef
        super AFormaldef
     readable var _n_id: TClassid
     readable var _n_type: nullable AType = null
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class ASuperclass
        super ASuperclass
-    readable var _n_kwspecial: nullable TKwspecial = null
-    readable var _n_kwsuper: nullable TKwsuper = null
+    readable var _n_kwsuper: TKwsuper
     readable var _n_type: AType
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class AAttrPropdef
        super APropdef
@@ -437,6 +457,7 @@ class AAttrPropdef
     readable var _n_id: nullable TAttrid = null
     readable var _n_id2: nullable TId = null
     readable var _n_type: nullable AType = null
+    readable var _n_annotations: nullable AAnnotations = null
     readable var _n_expr: nullable AExpr = null
 end
 class AMethPropdef
@@ -455,6 +476,7 @@ class ADeferredMethPropdef
     readable var _n_kwmeth: TKwmeth
     readable var _n_methid: AMethid
     readable var _n_signature: ASignature
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class AInternMethPropdef
        super APropdef
@@ -475,6 +497,7 @@ class AExternMethPropdef
     readable var _n_signature: ASignature
     readable var _n_extern: nullable TString = null
     readable var _n_extern_calls: nullable AExternCalls = null
+    readable var _n_extern_code_block: nullable AExternCodeBlock = null
 end
 class AConcreteMethPropdef
        super APropdef
@@ -484,6 +507,7 @@ class AConcreteMethPropdef
     readable var _n_kwmeth: TKwmeth
     readable var _n_methid: AMethid
     readable var _n_signature: ASignature
+    readable var _n_annotations: nullable AAnnotations = null
     readable var _n_block: nullable AExpr = null
 end
 class AConcreteInitPropdef
@@ -494,6 +518,7 @@ class AConcreteInitPropdef
     readable var _n_kwinit: TKwinit
     readable var _n_methid: nullable AMethid = null
     readable var _n_signature: ASignature
+    readable var _n_annotations: nullable AAnnotations = null
     readable var _n_block: nullable AExpr = null
 end
 class AExternInitPropdef
@@ -506,6 +531,7 @@ class AExternInitPropdef
     readable var _n_signature: ASignature
     readable var _n_extern: nullable TString = null
     readable var _n_extern_calls: nullable AExternCalls = null
+    readable var _n_extern_code_block: nullable AExternCodeBlock = null
 end
 class AMainMethPropdef
        super APropdef
@@ -520,6 +546,7 @@ class ATypePropdef
     readable var _n_kwtype: TKwtype
     readable var _n_id: TClassid
     readable var _n_type: AType
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class AReadAble
        super AAble
@@ -621,6 +648,7 @@ class AParam
     readable var _n_id: TId
     readable var _n_type: nullable AType = null
     readable var _n_dotdotdot: nullable TDotdotdot = null
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class AClosureDecl
        super AClosureDecl
@@ -635,6 +663,7 @@ class AType
     readable var _n_kwnullable: nullable TKwnullable = null
     readable var _n_id: TClassid
     readable var _n_types: List[AType] = new List[AType]
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class ALabel
        super ALabel
@@ -653,6 +682,7 @@ class AVardeclExpr
     readable var _n_type: nullable AType = null
     readable var _n_assign: nullable TAssign = null
     readable var _n_expr: nullable AExpr = null
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class AReturnExpr
        super AExpr
@@ -953,6 +983,7 @@ class ARangeExpr
        super AExpr
     readable var _n_expr: AExpr
     readable var _n_expr2: AExpr
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class ACrangeExpr
        super AExpr
@@ -960,6 +991,7 @@ class ACrangeExpr
     readable var _n_expr: AExpr
     readable var _n_expr2: AExpr
     readable var _n_cbra: TCbra
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class AOrangeExpr
        super AExpr
@@ -967,14 +999,17 @@ class AOrangeExpr
     readable var _n_expr: AExpr
     readable var _n_expr2: AExpr
     readable var _n_cbra: TObra
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class AArrayExpr
        super AExpr
     readable var _n_exprs: AExprs
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class ASelfExpr
        super AExpr
     readable var _n_kwself: TKwself
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class AImplicitSelfExpr
        super AExpr
@@ -982,30 +1017,37 @@ end
 class ATrueExpr
        super AExpr
     readable var _n_kwtrue: TKwtrue
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class AFalseExpr
        super AExpr
     readable var _n_kwfalse: TKwfalse
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class ANullExpr
        super AExpr
     readable var _n_kwnull: TKwnull
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class AIntExpr
        super AExpr
     readable var _n_number: TNumber
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class AFloatExpr
        super AExpr
     readable var _n_float: TFloat
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class ACharExpr
        super AExpr
     readable var _n_char: TChar
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class AStringExpr
        super AExpr
     readable var _n_string: TString
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class AStartStringExpr
        super AExpr
@@ -1022,12 +1064,14 @@ end
 class ASuperstringExpr
        super AExpr
     readable var _n_exprs: List[AExpr] = new List[AExpr]
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class AParExpr
        super AExpr
     readable var _n_opar: TOpar
     readable var _n_expr: AExpr
     readable var _n_cpar: TCpar
+    readable var _n_annotations: nullable AAnnotations = null
 end
 class AAsCastExpr
        super AExpr
@@ -1151,6 +1195,16 @@ class AAsNotNullableExternCall
     readable var _n_kwnot: TKwnot
     readable var _n_kwnullable: TKwnullable
 end
+class AInLanguage
+       super AInLanguage
+    readable var _n_kwin: TKwin
+    readable var _n_string: TString
+end
+class AExternCodeBlock
+       super AExternCodeBlock
+    readable var _n_in_language: nullable AInLanguage = null
+    readable var _n_extern_code_segment: TExternCodeSegment
+end
 class AQualified
        super AQualified
     readable var _n_id: List[TId] = new List[TId]
@@ -1160,6 +1214,57 @@ class ADoc
        super ADoc
     readable var _n_comment: List[TComment] = new List[TComment]
 end
+class AAnnotations
+       super AAnnotations
+    readable var _n_at: nullable TAt = null
+    readable var _n_opar: nullable TOpar = null
+    readable var _n_items: List[AAnnotation] = new List[AAnnotation]
+    readable var _n_cpar: nullable TCpar = null
+end
+class AAnnotation
+       super AAnnotation
+    readable var _n_atid: AAtid
+    readable var _n_opar: nullable TOpar = null
+    readable var _n_args: List[AAtArg] = new List[AAtArg]
+    readable var _n_cpar: nullable TCpar = null
+    readable var _n_annotations: nullable AAnnotations = null
+end
+class ATypeAtArg
+       super AAtArg
+    readable var _n_type: AType
+end
+class AExprAtArg
+       super AAtArg
+    readable var _n_expr: AExpr
+end
+class AAtAtArg
+       super AAtArg
+    readable var _n_annotations: AAnnotations
+end
+class AIdAtid
+       super AAtid
+    readable var _n_id: TId
+end
+class AKwexternAtid
+       super AAtid
+    readable var _n_id: TKwextern
+end
+class AKwinternAtid
+       super AAtid
+    readable var _n_id: TKwintern
+end
+class AKwreadableAtid
+       super AAtid
+    readable var _n_id: TKwreadable
+end
+class AKwwritableAtid
+       super AAtid
+    readable var _n_id: TKwwritable
+end
+class AKwimportAtid
+       super AAtid
+    readable var _n_id: TKwimport
+end
 
 class Start
        super Prod