ni_nitdoc: added fast copy past utility to signatures.
[nit.git] / src / parser / parser_nodes.nit
index 7f6b6b2..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
@@ -308,6 +310,9 @@ end
 class TBang
        super TokenOperator
 end
+class TAt
+       super Token
+end
 class TClassid
        super Token
        redef fun to_s
@@ -376,7 +381,6 @@ class TExternCodeSegment
 end
 class EOF
        super Token
-private init noinit do end
        redef fun to_s
        do
                return "end of file"
@@ -384,15 +388,12 @@ private init noinit do end
 end
 class AError
        super EOF
-private init noinit do end
 end
 class ALexerError
        super AError
-private init noinit do end
 end
 class AParserError
        super AError
-private init noinit do end
 end
 
 class AModule
@@ -1213,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