# Raw AST node hierarchy.
# This file was generated by SableCC (http://www.sablecc.org/).
-package parser_abs
+module parser_abs
import location
-# Root of the AST hierarchy
-abstract class ANode
- var _location: nullable Location
-
- # Location is set during AST building. Once built, location cannon be null
- # However, manual instanciated nodes may need mode care
- fun location: Location do return _location.as(not null)
-end
-
-# Ancestor of all tokens
-abstract class Token
- super ANode
-end
-
-# Ancestor of all productions
-abstract class Prod
- super ANode
- fun location=(loc: Location) do _location = loc
-end
class TEol
super Token
end
class TComment
super Token
end
+class TKwpackage
+ super Token
+end
class TKwmodule
super Token
end
class TKwextern
super Token
end
+class TKwpublic
+ super Token
+end
class TKwprotected
super Token
end
class TKwnot
super Token
end
+class TKwimplies
+ super Token
+end
class TKwreturn
super Token
end
class TBang
super Token
end
+class TAt
+ super Token
+end
class TClassid
super Token
end
class TFloat
super Token
end
-class TChar
- super Token
-end
class TString
super Token
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
class AMethid super Prod end
class ASignature super Prod end
class AParam super Prod end
-class AClosureDecl super Prod end
class AType super Prod end
class ALabel super Prod end
class AExpr super Prod end
class AExprs super Prod end
class AAssignOp super Prod end
-class AClosureDef super Prod end
-class AClosureId super Prod end
class AModuleName super Prod end
class AExternCalls super Prod end
class AExternCall 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_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
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]
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_kwsuper: TKwsuper
readable var _n_type: AType
+ readable var _n_annotations: nullable AAnnotations = null
end
class AAttrPropdef
super APropdef
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
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
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
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
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
readable var _n_params: List[AParam] = new List[AParam]
readable var _n_cpar: nullable TCpar = null
readable var _n_type: nullable AType = null
- readable var _n_closure_decls: List[AClosureDecl] = new List[AClosureDecl]
end
class AParam
super AParam
readable var _n_id: TId
readable var _n_type: nullable AType = null
readable var _n_dotdotdot: nullable TDotdotdot = null
-end
-class AClosureDecl
- super AClosureDecl
- readable var _n_kwbreak: nullable TKwbreak = null
- readable var _n_bang: TBang
- readable var _n_id: TId
- readable var _n_signature: ASignature
- readable var _n_expr: nullable AExpr = null
+ readable var _n_annotations: nullable AAnnotations = null
end
class AType
super 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
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
readable var _n_expr: AExpr
readable var _n_expr2: AExpr
end
-class ANotExpr
+class AImpliesExpr
super AExpr
- readable var _n_kwnot: TKwnot
readable var _n_expr: AExpr
+ readable var _n_expr2: AExpr
end
-class AEqExpr
+class ANotExpr
super AExpr
+ readable var _n_kwnot: TKwnot
readable var _n_expr: AExpr
- readable var _n_expr2: AExpr
end
-class AEeExpr
+class AEqExpr
super AExpr
readable var _n_expr: AExpr
readable var _n_expr2: AExpr
readable var _n_expr: AExpr
readable var _n_id: TId
readable var _n_args: AExprs
- readable var _n_closure_defs: List[AClosureDef] = new List[AClosureDef]
end
class ACallAssignExpr
super AExpr
super AExpr
readable var _n_expr: AExpr
readable var _n_args: AExprs
- readable var _n_closure_defs: List[AClosureDef] = new List[AClosureDef]
end
class ABraAssignExpr
super AExpr
readable var _n_assign_op: AAssignOp
readable var _n_value: AExpr
end
-class AClosureCallExpr
- super AExpr
- readable var _n_id: TId
- readable var _n_args: AExprs
- readable var _n_closure_defs: List[AClosureDef] = new List[AClosureDef]
-end
class AVarExpr
super AExpr
readable var _n_id: TId
super AExpr
readable var _n_expr: AExpr
readable var _n_expr2: AExpr
+ readable var _n_annotations: nullable AAnnotations = null
end
class ACrangeExpr
super AExpr
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
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
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
+class ADecIntExpr
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
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
readable var _n_expr: AExpr
readable var _n_kwas: TKwas
- readable var _n_opar: TOpar
+ readable var _n_opar: nullable TOpar = null
readable var _n_type: AType
- readable var _n_cpar: TCpar
+ readable var _n_cpar: nullable TCpar = null
end
class AAsNotnullExpr
super AExpr
readable var _n_expr: AExpr
readable var _n_kwas: TKwas
- readable var _n_opar: TOpar
+ readable var _n_opar: nullable TOpar = null
readable var _n_kwnot: TKwnot
readable var _n_kwnull: TKwnull
- readable var _n_cpar: TCpar
+ readable var _n_cpar: nullable TCpar = null
end
class AIssetAttrExpr
super AExpr
super AAssignOp
readable var _n_minuseq: TMinuseq
end
-class AClosureDef
- super AClosureDef
- readable var _n_bang: TBang
- readable var _n_id: AClosureId
- readable var _n_ids: List[TId] = new List[TId]
- readable var _n_kwdo: nullable TKwdo = null
- readable var _n_expr: nullable AExpr = null
- readable var _n_label: nullable ALabel = null
-end
-class ASimpleClosureId
- super AClosureId
- readable var _n_id: TId
-end
-class ABreakClosureId
- super AClosureId
- readable var _n_kwbreak: TKwbreak
-end
class AModuleName
super AModuleName
readable var _n_quad: nullable TQuad = null
end
class AFullPropExternCall
super AExternCall
- readable var _n_classid: TClassid
- readable var _n_quad: nullable TQuad = null
+ readable var _n_type: AType
+ readable var _n_dot: nullable TDot = null
readable var _n_methid: AMethid
end
class AInitPropExternCall
super AExternCall
- readable var _n_classid: TClassid
+ readable var _n_type: AType
end
class ACastAsExternCall
super AExternCall
readable var _n_from_type: AType
+ readable var _n_dot: nullable TDot = null
readable var _n_kwas: TKwas
readable var _n_to_type: AType
end
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