X-Git-Url: http://nitlanguage.org diff --git a/src/parser/parser_nodes.nit b/src/parser/parser_nodes.nit index 43e3541..376838c 100644 --- a/src/parser/parser_nodes.nit +++ b/src/parser/parser_nodes.nit @@ -156,6 +156,18 @@ end class TKwnull special Token end +class TKwas +special Token +end +class TKwwith +special Token +end +class TKwnullable +special Token +end +class TKwisset +special Token +end class TOpar special Token end @@ -263,9 +275,11 @@ special Token end class EOF special Token +private init noinit do end end class PError special EOF +private init noinit do end end class PModule special Prod end @@ -277,375 +291,387 @@ class PClasskind special Prod end class PFormaldef special Prod end class PSuperclass special Prod end class PPropdef special Prod - readable writable attr _n_doc: PDoc + readable writable attr _n_doc: nullable PDoc = null end class PAble special Prod - readable writable attr _n_kwredef: TKwredef + readable writable attr _n_kwredef: nullable TKwredef = null end class PMethid special Prod end class PSignature special Prod end class PParam special Prod - readable writable attr _n_id: TId - readable writable attr _n_type: PType + readable writable attr _n_id: TId + readable writable attr _n_type: nullable PType = null end +class PClosureDecl special Prod end class PType special Prod end class PExpr special Prod end class PAssignOp special Prod end +class PClosureDef special Prod end class PQualified special Prod end class PDoc special Prod end class AModule special PModule - readable writable attr _n_packagedecl: PPackagedecl - readable writable attr _n_imports: List[PImport] - readable writable attr _n_classdefs: List[PClassdef] + readable writable attr _n_packagedecl: nullable PPackagedecl = null + readable writable attr _n_imports: List[PImport] = new List[PImport] + readable writable attr _n_classdefs: List[PClassdef] = new List[PClassdef] end class APackagedecl special PPackagedecl - readable writable attr _n_doc: PDoc - readable writable attr _n_kwpackage: TKwpackage - readable writable attr _n_id: TId + readable writable attr _n_doc: nullable PDoc = null + readable writable attr _n_kwpackage: TKwpackage + readable writable attr _n_id: TId end class AImport special PImport - readable writable attr _n_visibility: PVisibility - readable writable attr _n_kwimport: TKwimport - readable writable attr _n_id: TId + readable writable attr _n_visibility: PVisibility + readable writable attr _n_kwimport: TKwimport + readable writable attr _n_id: TId end class ANoImport special PImport - readable writable attr _n_visibility: PVisibility - readable writable attr _n_kwimport: TKwimport - readable writable attr _n_kwend: TKwend + readable writable attr _n_visibility: PVisibility + readable writable attr _n_kwimport: TKwimport + readable writable attr _n_kwend: TKwend end class APublicVisibility special PVisibility end class APrivateVisibility special PVisibility - readable writable attr _n_kwprivate: TKwprivate + readable writable attr _n_kwprivate: TKwprivate end class AProtectedVisibility special PVisibility - readable writable attr _n_kwprotected: TKwprotected + readable writable attr _n_kwprotected: TKwprotected end class AIntrudeVisibility special PVisibility - readable writable attr _n_kwintrude: TKwintrude + readable writable attr _n_kwintrude: TKwintrude end class AClassdef special PClassdef - readable writable attr _n_doc: PDoc - readable writable attr _n_kwredef: TKwredef - readable writable attr _n_visibility: PVisibility - readable writable attr _n_classkind: PClasskind - readable writable attr _n_id: TClassid - readable writable attr _n_formaldefs: List[PFormaldef] - readable writable attr _n_superclasses: List[PSuperclass] - readable writable attr _n_propdefs: List[PPropdef] + readable writable attr _n_doc: nullable PDoc = null + readable writable attr _n_kwredef: nullable TKwredef = null + readable writable attr _n_visibility: PVisibility + readable writable attr _n_classkind: PClasskind + readable writable attr _n_id: nullable TClassid = null + readable writable attr _n_formaldefs: List[PFormaldef] = new List[PFormaldef] + readable writable attr _n_superclasses: List[PSuperclass] = new List[PSuperclass] + readable writable attr _n_propdefs: List[PPropdef] = new List[PPropdef] end class ATopClassdef special PClassdef - readable writable attr _n_propdefs: List[PPropdef] + readable writable attr _n_propdefs: List[PPropdef] = new List[PPropdef] end class AMainClassdef special PClassdef - readable writable attr _n_propdefs: List[PPropdef] + readable writable attr _n_propdefs: List[PPropdef] = new List[PPropdef] end class AConcreteClasskind special PClasskind - readable writable attr _n_kwclass: TKwclass + readable writable attr _n_kwclass: TKwclass end class AAbstractClasskind special PClasskind - readable writable attr _n_kwabstract: TKwabstract - readable writable attr _n_kwclass: TKwclass + readable writable attr _n_kwabstract: TKwabstract + readable writable attr _n_kwclass: TKwclass end class AInterfaceClasskind special PClasskind - readable writable attr _n_kwinterface: TKwinterface + readable writable attr _n_kwinterface: TKwinterface end class AUniversalClasskind special PClasskind - readable writable attr _n_kwuniversal: TKwuniversal + readable writable attr _n_kwuniversal: TKwuniversal end class AFormaldef special PFormaldef - readable writable attr _n_id: TClassid - readable writable attr _n_type: PType + readable writable attr _n_id: TClassid + readable writable attr _n_type: nullable PType = null end class ASuperclass special PSuperclass - readable writable attr _n_kwspecial: TKwspecial - readable writable attr _n_type: PType + readable writable attr _n_kwspecial: TKwspecial + readable writable attr _n_type: PType end class AAttrPropdef special PPropdef - readable writable attr _n_kwredef: TKwredef - readable writable attr _n_visibility: PVisibility - readable writable attr _n_kwattr: TKwattr - readable writable attr _n_id: TAttrid - readable writable attr _n_type: PType - readable writable attr _n_readable: PAble - readable writable attr _n_writable: PAble - readable writable attr _n_expr: PExpr + readable writable attr _n_kwredef: nullable TKwredef = null + readable writable attr _n_visibility: PVisibility + readable writable attr _n_kwattr: nullable TKwattr = null + readable writable attr _n_kwvar: nullable TKwvar = null + readable writable attr _n_id: TAttrid + readable writable attr _n_type: nullable PType = null + readable writable attr _n_readable: nullable PAble = null + readable writable attr _n_writable: nullable PAble = null + readable writable attr _n_expr: nullable PExpr = null end class AMethPropdef special PPropdef - readable writable attr _n_kwredef: TKwredef - readable writable attr _n_visibility: PVisibility - readable writable attr _n_methid: PMethid - readable writable attr _n_signature: PSignature + readable writable attr _n_kwredef: nullable TKwredef = null + readable writable attr _n_visibility: nullable PVisibility + readable writable attr _n_methid: nullable PMethid = null + readable writable attr _n_signature: nullable PSignature end class ADeferredMethPropdef special AMethPropdef - readable writable attr _n_kwmeth: TKwmeth + readable writable attr _n_kwmeth: TKwmeth end class AInternMethPropdef special AMethPropdef - readable writable attr _n_kwmeth: TKwmeth + readable writable attr _n_kwmeth: TKwmeth end class AExternMethPropdef special AMethPropdef - readable writable attr _n_kwmeth: TKwmeth - readable writable attr _n_extern: TString + readable writable attr _n_kwmeth: TKwmeth + readable writable attr _n_extern: nullable TString = null end class AConcreteMethPropdef special AMethPropdef - readable writable attr _n_kwmeth: TKwmeth - readable writable attr _n_block: PExpr + readable writable attr _n_kwmeth: nullable TKwmeth + readable writable attr _n_block: nullable PExpr = null end class AConcreteInitPropdef special AConcreteMethPropdef - readable writable attr _n_kwinit: TKwinit + readable writable attr _n_kwinit: TKwinit end class AMainMethPropdef special AConcreteMethPropdef end class ATypePropdef special PPropdef - readable writable attr _n_kwredef: TKwredef - readable writable attr _n_visibility: PVisibility - readable writable attr _n_kwtype: TKwtype - readable writable attr _n_id: TClassid - readable writable attr _n_type: PType + readable writable attr _n_kwredef: nullable TKwredef = null + readable writable attr _n_visibility: PVisibility + readable writable attr _n_kwtype: TKwtype + readable writable attr _n_id: TClassid + readable writable attr _n_type: PType end class AReadAble special PAble - readable writable attr _n_kwreadable: TKwreadable + readable writable attr _n_kwreadable: TKwreadable end class AWriteAble special PAble - readable writable attr _n_kwwritable: TKwwritable + readable writable attr _n_kwwritable: TKwwritable end class AIdMethid special PMethid - readable writable attr _n_id: TId + readable writable attr _n_id: TId end class APlusMethid special PMethid - readable writable attr _n_plus: TPlus + readable writable attr _n_plus: TPlus end class AMinusMethid special PMethid - readable writable attr _n_minus: TMinus + readable writable attr _n_minus: TMinus end class AStarMethid special PMethid - readable writable attr _n_star: TStar + readable writable attr _n_star: TStar end class ASlashMethid special PMethid - readable writable attr _n_slash: TSlash + readable writable attr _n_slash: TSlash end class APercentMethid special PMethid - readable writable attr _n_percent: TPercent + readable writable attr _n_percent: TPercent end class AEqMethid special PMethid - readable writable attr _n_eq: TEq + readable writable attr _n_eq: TEq end class ANeMethid special PMethid - readable writable attr _n_ne: TNe + readable writable attr _n_ne: TNe end class ALeMethid special PMethid - readable writable attr _n_le: TLe + readable writable attr _n_le: TLe end class AGeMethid special PMethid - readable writable attr _n_ge: TGe + readable writable attr _n_ge: TGe end class ALtMethid special PMethid - readable writable attr _n_lt: TLt + readable writable attr _n_lt: TLt end class AGtMethid special PMethid - readable writable attr _n_gt: TGt + readable writable attr _n_gt: TGt end class ABraMethid special PMethid - readable writable attr _n_obra: TObra - readable writable attr _n_cbra: TCbra + readable writable attr _n_obra: TObra + readable writable attr _n_cbra: TCbra end class AStarshipMethid special PMethid - readable writable attr _n_starship: TStarship + readable writable attr _n_starship: TStarship end class AAssignMethid special PMethid - readable writable attr _n_id: TId - readable writable attr _n_assign: TAssign + readable writable attr _n_id: TId + readable writable attr _n_assign: TAssign end class ABraassignMethid special PMethid - readable writable attr _n_obra: TObra - readable writable attr _n_cbra: TCbra - readable writable attr _n_assign: TAssign + readable writable attr _n_obra: TObra + readable writable attr _n_cbra: TCbra + readable writable attr _n_assign: TAssign end class ASignature special PSignature - readable writable attr _n_params: List[PParam] - readable writable attr _n_type: PType + readable writable attr _n_params: List[PParam] = new List[PParam] + readable writable attr _n_type: nullable PType = null + readable writable attr _n_closure_decls: List[PClosureDecl] = new List[PClosureDecl] end class AParam special PParam - readable writable attr _n_dotdotdot: TDotdotdot + readable writable attr _n_dotdotdot: nullable TDotdotdot = null +end +class AClosureDecl +special PClosureDecl + readable writable attr _n_kwwith: TKwwith + readable writable attr _n_kwbreak: nullable TKwbreak = null + readable writable attr _n_id: TId + readable writable attr _n_signature: PSignature + readable writable attr _n_expr: nullable PExpr = null end class AType special PType - readable writable attr _n_id: TClassid - readable writable attr _n_types: List[PType] + readable writable attr _n_kwnullable: nullable TKwnullable = null + readable writable attr _n_id: TClassid + readable writable attr _n_types: List[PType] = new List[PType] end class ABlockExpr special PExpr - readable writable attr _n_expr: List[PExpr] + readable writable attr _n_expr: List[PExpr] = new List[PExpr] end class AVardeclExpr special PExpr - readable writable attr _n_kwvar: TKwvar - readable writable attr _n_id: TId - readable writable attr _n_type: PType - readable writable attr _n_assign: TAssign - readable writable attr _n_expr: PExpr + readable writable attr _n_kwvar: TKwvar + readable writable attr _n_id: TId + readable writable attr _n_type: nullable PType = null + readable writable attr _n_assign: nullable TAssign = null + readable writable attr _n_expr: nullable PExpr = null end class AReturnExpr special PExpr - readable writable attr _n_kwreturn: TKwreturn - readable writable attr _n_expr: PExpr + readable writable attr _n_kwreturn: TKwreturn + readable writable attr _n_expr: nullable PExpr = null end class ABreakExpr special PExpr - readable writable attr _n_kwbreak: TKwbreak + readable writable attr _n_kwbreak: TKwbreak + readable writable attr _n_expr: nullable PExpr = null end class AAbortExpr special PExpr - readable writable attr _n_kwabort: TKwabort + readable writable attr _n_kwabort: TKwabort end class AContinueExpr special PExpr - readable writable attr _n_kwcontinue: TKwcontinue + readable writable attr _n_kwcontinue: TKwcontinue + readable writable attr _n_expr: nullable PExpr = null end class ADoExpr special PExpr - readable writable attr _n_kwdo: TKwdo - readable writable attr _n_block: PExpr + readable writable attr _n_kwdo: TKwdo + readable writable attr _n_block: nullable PExpr = null end class AIfExpr special PExpr - readable writable attr _n_kwif: TKwif - readable writable attr _n_expr: PExpr - readable writable attr _n_then: PExpr - readable writable attr _n_else: PExpr + readable writable attr _n_kwif: TKwif + readable writable attr _n_expr: PExpr + readable writable attr _n_then: nullable PExpr = null + readable writable attr _n_else: nullable PExpr = null end class AIfexprExpr special PExpr - readable writable attr _n_kwif: TKwif - readable writable attr _n_expr: PExpr - readable writable attr _n_kwthen: TKwthen - readable writable attr _n_then: PExpr - readable writable attr _n_kwelse: TKwelse - readable writable attr _n_else: PExpr + readable writable attr _n_kwif: TKwif + readable writable attr _n_expr: PExpr + readable writable attr _n_kwthen: TKwthen + readable writable attr _n_then: PExpr + readable writable attr _n_kwelse: TKwelse + readable writable attr _n_else: PExpr end class AWhileExpr special PExpr - readable writable attr _n_kwwhile: TKwwhile - readable writable attr _n_expr: PExpr - readable writable attr _n_kwdo: TKwdo - readable writable attr _n_block: PExpr + readable writable attr _n_kwwhile: TKwwhile + readable writable attr _n_expr: PExpr + readable writable attr _n_kwdo: TKwdo + readable writable attr _n_block: nullable PExpr = null end class AForExpr special PExpr - readable writable attr _n_vardecl: PExpr - readable writable attr _n_kwdo: TKwdo - readable writable attr _n_block: PExpr -end -class AForVardeclExpr -special PExpr - readable writable attr _n_kwfor: TKwfor - readable writable attr _n_id: TId - readable writable attr _n_expr: PExpr + readable writable attr _n_kwfor: TKwfor + readable writable attr _n_id: TId + readable writable attr _n_expr: PExpr + readable writable attr _n_kwdo: TKwdo + readable writable attr _n_block: nullable PExpr = null end class AAssertExpr special PExpr - readable writable attr _n_kwassert: TKwassert - readable writable attr _n_id: TId - readable writable attr _n_expr: PExpr + readable writable attr _n_kwassert: TKwassert + readable writable attr _n_id: nullable TId = null + readable writable attr _n_expr: PExpr end class AAssignFormExpr special PExpr - readable writable attr _n_assign: TAssign - readable writable attr _n_value: PExpr + readable writable attr _n_assign: TAssign + readable writable attr _n_value: PExpr end class AReassignFormExpr special PExpr readable writable attr _n_assign_op: PAssignOp - readable writable attr _n_value: PExpr + readable writable attr _n_value: PExpr end class AOnceExpr special AProxyExpr - readable writable attr _n_kwonce: TKwonce + readable writable attr _n_kwonce: TKwonce end class ASendExpr special PExpr - readable writable attr _n_expr: PExpr + readable writable attr _n_expr: PExpr + readable writable attr _n_closure_defs: List[PClosureDef] = new List[PClosureDef] end class ABinopExpr special ASendExpr - readable writable attr _n_expr2: PExpr + readable writable attr _n_expr2: PExpr end class ABoolExpr special PExpr end class AOrExpr special ABoolExpr - readable writable attr _n_expr: PExpr - readable writable attr _n_expr2: PExpr + readable writable attr _n_expr: PExpr + readable writable attr _n_expr2: PExpr end class AAndExpr special ABoolExpr - readable writable attr _n_expr: PExpr - readable writable attr _n_expr2: PExpr + readable writable attr _n_expr: PExpr + readable writable attr _n_expr2: PExpr end class ANotExpr special ABoolExpr - readable writable attr _n_kwnot: TKwnot - readable writable attr _n_expr: PExpr + readable writable attr _n_kwnot: TKwnot + readable writable attr _n_expr: PExpr end class AEqExpr special ABinopExpr end class AEeExpr special ABoolExpr - readable writable attr _n_expr: PExpr - readable writable attr _n_expr2: PExpr + readable writable attr _n_expr: PExpr + readable writable attr _n_expr2: PExpr end class ANeExpr special ABinopExpr @@ -664,8 +690,8 @@ special ABinopExpr end class AIsaExpr special ABoolExpr - readable writable attr _n_expr: PExpr - readable writable attr _n_type: PType + readable writable attr _n_expr: PExpr + readable writable attr _n_type: PType end class APlusExpr special ABinopExpr @@ -687,31 +713,31 @@ special ABinopExpr end class AUminusExpr special ASendExpr - readable writable attr _n_minus: TMinus + readable writable attr _n_minus: TMinus end class ANewExpr special PExpr - readable writable attr _n_kwnew: TKwnew - readable writable attr _n_type: PType - readable writable attr _n_id: TId - readable writable attr _n_args: List[PExpr] + readable writable attr _n_kwnew: TKwnew + readable writable attr _n_type: PType + readable writable attr _n_id: nullable TId = null + readable writable attr _n_args: List[PExpr] = new List[PExpr] end class AAttrFormExpr special PExpr - readable writable attr _n_expr: PExpr - readable writable attr _n_id: TAttrid + readable writable attr _n_expr: PExpr + readable writable attr _n_id: TAttrid end class AAttrExpr special AAttrFormExpr end class AAttrAssignExpr -special AAttrFormExpr -special AAssignFormExpr +special AAttrFormExpr +special AAssignFormExpr end class ACallFormExpr special ASendExpr - readable writable attr _n_id: TId - readable writable attr _n_args: List[PExpr] + readable writable attr _n_id: TId + readable writable attr _n_args: List[PExpr] = new List[PExpr] end class AAttrReassignExpr special PExpr @@ -732,18 +758,18 @@ special AReassignFormExpr end class ASuperExpr special PExpr - readable writable attr _n_qualified: PQualified - readable writable attr _n_kwsuper: TKwsuper - readable writable attr _n_args: List[PExpr] + readable writable attr _n_qualified: nullable PQualified = null + readable writable attr _n_kwsuper: TKwsuper + readable writable attr _n_args: List[PExpr] = new List[PExpr] end class AInitExpr special ASendExpr - readable writable attr _n_kwinit: TKwinit - readable writable attr _n_args: List[PExpr] + readable writable attr _n_kwinit: TKwinit + readable writable attr _n_args: List[PExpr] = new List[PExpr] end class ABraFormExpr special ASendExpr - readable writable attr _n_args: List[PExpr] + readable writable attr _n_args: List[PExpr] = new List[PExpr] end class ABraExpr special ABraFormExpr @@ -754,12 +780,18 @@ special AAssignFormExpr end class AVarFormExpr special PExpr - readable writable attr _n_id: TId + readable writable attr _n_id: TId end class ABraReassignExpr special ABraFormExpr special AReassignFormExpr end +class AClosureCallExpr +special PExpr + readable writable attr _n_id: TId + readable writable attr _n_args: List[PExpr] = new List[PExpr] + readable writable attr _n_closure_defs: List[PClosureDef] = new List[PClosureDef] +end class AVarExpr special AVarFormExpr end @@ -773,8 +805,8 @@ special AReassignFormExpr end class ARangeExpr special PExpr - readable writable attr _n_expr: PExpr - readable writable attr _n_expr2: PExpr + readable writable attr _n_expr: PExpr + readable writable attr _n_expr2: PExpr end class ACrangeExpr special ARangeExpr @@ -784,89 +816,113 @@ special ARangeExpr end class AArrayExpr special PExpr - readable writable attr _n_exprs: List[PExpr] + readable writable attr _n_exprs: List[PExpr] = new List[PExpr] end class ASelfExpr special PExpr - readable writable attr _n_kwself: TKwself + readable writable attr _n_kwself: nullable TKwself end class AImplicitSelfExpr special ASelfExpr end class ATrueExpr special ABoolExpr - readable writable attr _n_kwtrue: TKwtrue + readable writable attr _n_kwtrue: TKwtrue end class AFalseExpr special ABoolExpr - readable writable attr _n_kwfalse: TKwfalse + readable writable attr _n_kwfalse: TKwfalse end class ANullExpr special PExpr - readable writable attr _n_kwnull: TKwnull + readable writable attr _n_kwnull: TKwnull end class AIntExpr special PExpr - readable writable attr _n_number: TNumber + readable writable attr _n_number: TNumber end class AFloatExpr special PExpr - readable writable attr _n_float: TFloat + readable writable attr _n_float: TFloat end class ACharExpr special PExpr - readable writable attr _n_char: TChar + readable writable attr _n_char: TChar end class AStringFormExpr special PExpr end class AStringExpr special AStringFormExpr - readable writable attr _n_string: TString + readable writable attr _n_string: TString end class AStartStringExpr special AStringFormExpr - readable writable attr _n_string: TStartString + readable writable attr _n_string: TStartString end class AMidStringExpr special AStringFormExpr - readable writable attr _n_string: TMidString + readable writable attr _n_string: TMidString end class AEndStringExpr special AStringFormExpr - readable writable attr _n_string: TEndString + readable writable attr _n_string: TEndString end class ASuperstringExpr special PExpr - readable writable attr _n_exprs: List[PExpr] + readable writable attr _n_exprs: List[PExpr] = new List[PExpr] end class AParExpr special AProxyExpr end class AProxyExpr special PExpr - readable writable attr _n_expr: PExpr + readable writable attr _n_expr: PExpr +end +class AAsCastExpr +special PExpr + readable writable attr _n_expr: PExpr + readable writable attr _n_kwas: TKwas + readable writable attr _n_type: PType +end +class AAsNotnullExpr +special PExpr + readable writable attr _n_expr: PExpr + readable writable attr _n_kwas: TKwas + readable writable attr _n_kwnot: TKwnot + readable writable attr _n_kwnull: TKwnull +end +class AIssetAttrExpr +special AAttrFormExpr + readable writable attr _n_kwisset: TKwisset end class APlusAssignOp special PAssignOp - readable writable attr _n_pluseq: TPluseq + readable writable attr _n_pluseq: TPluseq end class AMinusAssignOp special PAssignOp - readable writable attr _n_minuseq: TMinuseq + readable writable attr _n_minuseq: TMinuseq +end +class AClosureDef +special PClosureDef + readable writable attr _n_kwwith: TKwwith + readable writable attr _n_id: List[TId] = new List[TId] + readable writable attr _n_kwdo: TKwdo + readable writable attr _n_expr: nullable PExpr = null end class AQualified special PQualified - readable writable attr _n_id: List[TId] - readable writable attr _n_classid: TClassid + readable writable attr _n_id: List[TId] = new List[TId] + readable writable attr _n_classid: nullable TClassid = null end class ADoc special PDoc - readable writable attr _n_comment: List[TComment] + readable writable attr _n_comment: List[TComment] = new List[TComment] end class Start special Prod - readable writable attr _n_base: PModule - readable writable attr _n_eof: EOF + readable writable attr _n_base: nullable PModule + readable writable attr _n_eof: EOF end