# 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 TKwenum
super Token
end
-class TKwspecial
- super Token
-end
class TKwend
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 TKwlabel
super Token
end
+class TKwdebug
+ super Token
+end
class TOpar
super Token
end
class TBang
super Token
end
+class TAt
+ super Token
+end
class TClassid
super Token
end
class TNumber
super Token
end
-class TFloat
+class THexNumber
super Token
end
-class TChar
+class TFloat
super Token
end
class TString
class TEndString
super Token
end
+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 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
super AModuledecl
readable var _n_doc: nullable ADoc = null
readable var _n_kwmodule: TKwmodule
- readable var _n_id: TId
+ 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_id: TId
+ 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]
+ readable var _n_kwend: TKwend
end
class ATopClassdef
super AClassdef
super AClasskind
readable var _n_kwenum: TKwenum
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
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_methid: AMethid
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
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
+ super APropdef
+ readable var _n_doc: nullable ADoc = null
+ readable var _n_kwredef: nullable TKwredef = null
+ readable var _n_visibility: AVisibility
+ readable var _n_kwnew: TKwnew
+ readable var _n_methid: nullable AMethid = null
+ 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
readable var _n_kwredef: nullable TKwredef = null
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
end
class ASignature
super ASignature
+ readable var _n_opar: nullable TOpar = null
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
class ABlockExpr
super AExpr
readable var _n_expr: List[AExpr] = new List[AExpr]
+ readable var _n_kwend: nullable TKwend = null
end
class AVardeclExpr
super AExpr
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_kwnew: TKwnew
readable var _n_type: AType
readable var _n_id: nullable TId = null
- readable var _n_args: List[AExpr] = new List[AExpr]
+ readable var _n_args: AExprs
end
class AAttrExpr
super AExpr
super AExpr
readable var _n_expr: AExpr
readable var _n_id: TId
- readable var _n_args: List[AExpr] = new List[AExpr]
- readable var _n_closure_defs: List[AClosureDef] = new List[AClosureDef]
+ readable var _n_args: AExprs
end
class ACallAssignExpr
super AExpr
readable var _n_expr: AExpr
readable var _n_id: TId
- readable var _n_args: List[AExpr] = new List[AExpr]
+ readable var _n_args: AExprs
readable var _n_assign: TAssign
readable var _n_value: AExpr
end
super AExpr
readable var _n_expr: AExpr
readable var _n_id: TId
- readable var _n_args: List[AExpr] = new List[AExpr]
+ readable var _n_args: AExprs
readable var _n_assign_op: AAssignOp
readable var _n_value: AExpr
end
super AExpr
readable var _n_qualified: nullable AQualified = null
readable var _n_kwsuper: TKwsuper
- readable var _n_args: List[AExpr] = new List[AExpr]
+ readable var _n_args: AExprs
end
class AInitExpr
super AExpr
readable var _n_expr: AExpr
readable var _n_kwinit: TKwinit
- readable var _n_args: List[AExpr] = new List[AExpr]
+ readable var _n_args: AExprs
end
class ABraExpr
super AExpr
readable var _n_expr: AExpr
- readable var _n_args: List[AExpr] = new List[AExpr]
- readable var _n_closure_defs: List[AClosureDef] = new List[AClosureDef]
+ readable var _n_args: AExprs
end
class ABraAssignExpr
super AExpr
readable var _n_expr: AExpr
- readable var _n_args: List[AExpr] = new List[AExpr]
+ readable var _n_args: AExprs
readable var _n_assign: TAssign
readable var _n_value: AExpr
end
class ABraReassignExpr
super AExpr
readable var _n_expr: AExpr
- readable var _n_args: List[AExpr] = new List[AExpr]
+ readable var _n_args: AExprs
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: List[AExpr] = new List[AExpr]
- 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_obra: TObra
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_obra: TObra
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: List[AExpr] = new List[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 AHexIntExpr
+ super AExpr
+ readable var _n_hex_number: THexNumber
+ 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: nullable TOpar = null
readable var _n_type: AType
+ 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: nullable TOpar = null
readable var _n_kwnot: TKwnot
readable var _n_kwnull: TKwnull
+ readable var _n_cpar: nullable TCpar = null
end
class AIssetAttrExpr
super AExpr
readable var _n_expr: AExpr
readable var _n_id: TAttrid
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
+ readable var _n_exprs: List[AExpr] = new List[AExpr]
+end
+class AParExprs
+ super AExprs
+ readable var _n_opar: TOpar
+ readable var _n_exprs: List[AExpr] = new List[AExpr]
+ readable var _n_cpar: TCpar
+end
+class ABraExprs
+ super AExprs
+ readable var _n_obra: TObra
+ readable var _n_exprs: List[AExpr] = new List[AExpr]
+ readable var _n_cbra: TCbra
+end
class APlusAssignOp
super AAssignOp
readable var _n_pluseq: TPluseq
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
+class AModuleName
+ super AModuleName
+ readable var _n_quad: nullable TQuad = null
+ readable var _n_path: List[TId] = new List[TId]
readable var _n_id: TId
end
-class ABreakClosureId
- super AClosureId
- readable var _n_kwbreak: TKwbreak
+class AExternCalls
+ super AExternCalls
+ readable var _n_kwimport: TKwimport
+ readable var _n_extern_calls: List[AExternCall] = new List[AExternCall]
+end
+class AExternCall
+ super AExternCall
+end
+class ASuperExternCall
+ super AExternCall
+ readable var _n_kwsuper: TKwsuper
+end
+class ALocalPropExternCall
+ super AExternCall
+ readable var _n_methid: AMethid
+end
+class AFullPropExternCall
+ super AExternCall
+ 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_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
+class AAsNullableExternCall
+ super AExternCall
+ readable var _n_type: AType
+ readable var _n_kwas: TKwas
+ readable var _n_kwnullable: TKwnullable
+end
+class AAsNotNullableExternCall
+ super AExternCall
+ readable var _n_type: AType
+ readable var _n_kwas: TKwas
+ 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
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
readable var _n_base: nullable AModule
readable var _n_eof: EOF
+ init(
+ n_base: nullable AModule,
+ n_eof: EOF)
+ do
+ _n_base = n_base
+ _n_eof = n_eof
+ end
+
end