ni_nitdoc: added fast copy past utility to signatures.
[nit.git] / src / parser / parser_nodes.nit
index 13b68d8..6fe5b6c 100644 (file)
@@ -42,6 +42,7 @@ end
 abstract class Token
        super ANode
        fun text: String is abstract
+       fun text=(text: String) is abstract
 
        redef fun to_s: String do
                return "'{text}'"
@@ -52,6 +53,7 @@ end
 abstract class Prod
        super ANode
        fun location=(l: Location) do _location = l
+       readable var _n_annotations: nullable AAnnotations = null
 end
 class TEol
        super Token
@@ -88,9 +90,6 @@ end
 class TKwenum
        super TokenKeyword
 end
-class TKwspecial
-       super TokenKeyword
-end
 class TKwend
        super TokenKeyword
 end
@@ -217,6 +216,9 @@ end
 class TKwlabel
        super TokenKeyword
 end
+class TKwdebug
+       super Token
+end
 class TOpar
        super Token
 end
@@ -308,6 +310,9 @@ end
 class TBang
        super TokenOperator
 end
+class TAt
+       super Token
+end
 class TClassid
        super Token
        redef fun to_s
@@ -371,9 +376,11 @@ class TBadChar
                do return "malformed character {text}"
        end
 end
+class TExternCodeSegment
+       super Token
+end
 class EOF
        super Token
-private init noinit do end
        redef fun to_s
        do
                return "end of file"
@@ -381,13 +388,19 @@ 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
     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
@@ -436,6 +449,7 @@ 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_extern_code_block: nullable AExternCodeBlock = null
     readable var _n_superclasses: List[ASuperclass] = new List[ASuperclass]
     readable var _n_kwend: TKwend
     redef fun hot_location do return n_id.location
@@ -467,6 +481,7 @@ end
 class AExternClasskind
        super AClasskind
     readable var _n_kwextern: TKwextern
+    readable var _n_kwclass: nullable TKwclass = null
 end
 class AFormaldef
        super Prod
@@ -475,8 +490,7 @@ class AFormaldef
 end
 class ASuperclass
        super Prod
-    readable var _n_kwspecial: nullable TKwspecial = null
-    readable var _n_kwsuper: nullable TKwsuper = null
+    readable var _n_kwsuper: TKwsuper
     readable var _n_type: AType
 end
 abstract class APropdef super Prod
@@ -525,6 +539,7 @@ abstract class AExternPropdef
        super AMethPropdef
     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 AExternMethPropdef
        super AMethPropdef
@@ -562,43 +577,43 @@ abstract class AExternCall
        super Prod
 end
 abstract class APropExternCall
-special AExternCall
+super AExternCall
 end
 class ALocalPropExternCall
-special APropExternCall
+super APropExternCall
     readable var _n_methid: AMethid
 end
 class AFullPropExternCall
-special APropExternCall
+super APropExternCall
     readable var _n_classid: TClassid
     readable var _n_quad: nullable TQuad = null
     readable var _n_methid: AMethid
 end
 class AInitPropExternCall
-special APropExternCall
+super APropExternCall
     readable var _n_classid: TClassid
 end
 class ASuperExternCall
-special AExternCall
+super AExternCall
     readable var _n_kwsuper: TKwsuper
 end
 abstract class ACastExternCall
-special AExternCall
+super AExternCall
 end
 class ACastAsExternCall
-special ACastExternCall
+super ACastExternCall
     readable var _n_from_type: AType
     readable var _n_kwas: TKwas
     readable var _n_to_type: AType
 end
 class AAsNullableExternCall
-special ACastExternCall
+super ACastExternCall
     readable var _n_type: AType
     readable var _n_kwas: TKwas
     readable var _n_kwnullable: TKwnullable
 end
 class AAsNotNullableExternCall
-special ACastExternCall
+super ACastExternCall
     readable var _n_type: AType
     readable var _n_kwas: TKwas
     readable var _n_kwnot: TKwnot
@@ -1071,22 +1086,19 @@ class ACharExpr
 end
 abstract class AStringFormExpr
        super AExpr
+    readable var _n_string: Token
 end
 class AStringExpr
        super AStringFormExpr
-    readable var _n_string: TString
 end
 class AStartStringExpr
        super AStringFormExpr
-    readable var _n_string: TStartString
 end
 class AMidStringExpr
        super AStringFormExpr
-    readable var _n_string: TMidString
 end
 class AEndStringExpr
        super AStringFormExpr
-    readable var _n_string: TEndString
 end
 class ASuperstringExpr
        super AExpr
@@ -1126,6 +1138,13 @@ abstract class AExprs
        super Prod 
     readable var _n_exprs: List[AExpr] = new List[AExpr]
 end
+class ADebugTypeExpr
+       super AExpr
+    readable var _n_kwdebug: TKwdebug
+    readable var _n_kwtype: TKwtype
+    readable var _n_expr: AExpr
+    readable var _n_type: AType
+end
 class AListExprs
        super AExprs
 end
@@ -1169,11 +1188,21 @@ class ABreakClosureId
     readable var _n_kwbreak: TKwbreak
 end
 class AModuleName
-special Prod
+super Prod
     readable var _n_quad: nullable TQuad = null
     readable var _n_path: List[TId] = new List[TId]
     readable var _n_id: TId
 end
+class AInLanguage
+       super Prod
+    readable var _n_kwin: TKwin
+    readable var _n_string: TString
+end
+class AExternCodeBlock
+       super Prod
+    readable var _n_in_language: nullable AInLanguage = null
+    readable var _n_extern_code_segment: TExternCodeSegment
+end
 class AQualified
        super Prod
     readable var _n_quad: nullable TQuad = null
@@ -1185,6 +1214,57 @@ class ADoc
     readable var _n_comment: List[TComment] = new List[TComment]
 end
 
+class AAnnotations
+       super Prod
+       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 Prod
+       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
+end
+abstract class AAtArg
+       super Prod
+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
+end
+abstract class AAtid
+       super Prod
+       readable var _n_id: Token
+end
+class AIdAtid
+       super AAtid
+end
+class AKwexternAtid
+       super AAtid
+end
+class AKwinternAtid
+       super AAtid
+end
+class AKwreadableAtid
+       super AAtid
+end
+class AKwwritableAtid
+       super AAtid
+end
+class AKwimportAtid
+       super AAtid
+end
+
 class Start
        super Prod
     readable var _n_base: nullable AModule