bench: enable HTML generation
[nit.git] / src / parser / parser_nodes.nit
1 # This file is part of NIT ( http://www.nitlanguage.org ).
2 #
3 # Copyright 2008-2009 Jean Privat <jean@pryen.org>
4 # Copyright 2009 Jean-Sebastien Gelinas <calestar@gmail.com>
5 #
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 # http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17
18 # AST nodes of the Nit language
19 # Was previously based on parser_abs.nit.
20 package parser_nodes
21
22 import location
23
24 # Root of the AST hierarchy
25 abstract class ANode
26 var _location: nullable Location
27 # Location is set during AST building. Once built, location cannon be null
28 # However, manual instanciated nodes may need mode care
29 fun location: Location do return _location.as(not null)
30 # The location of the important part of the node (identifier or whatever)
31 fun hot_location: Location do return location
32 init do end
33
34 # Display a message for the colored location of the node
35 fun debug(message: String)
36 do
37 print "{hot_location} {self.class_name}: {message}\n{hot_location.colored_line("0;32")}"
38 end
39 end
40
41 # Ancestor of all tokens
42 abstract class Token
43 super ANode
44 fun text: String is abstract
45 fun text=(text: String) is abstract
46
47 redef fun to_s: String do
48 return "'{text}'"
49 end
50 end
51
52 # Ancestor of all productions
53 abstract class Prod
54 super ANode
55 fun location=(l: Location) do _location = l
56 end
57 class TEol
58 super Token
59 redef fun to_s
60 do
61 return "end of line"
62 end
63 end
64 class TComment
65 super Token
66 end
67 abstract class TokenKeyword
68 super Token
69 redef fun to_s
70 do
71 return "keyword '{text}'"
72 end
73 end
74 class TKwmodule
75 super TokenKeyword
76 end
77 class TKwimport
78 super TokenKeyword
79 end
80 class TKwclass
81 super TokenKeyword
82 end
83 class TKwabstract
84 super TokenKeyword
85 end
86 class TKwinterface
87 super TokenKeyword
88 end
89 class TKwenum
90 super TokenKeyword
91 end
92 class TKwend
93 super TokenKeyword
94 end
95 class TKwmeth
96 super TokenKeyword
97 end
98 class TKwtype
99 super TokenKeyword
100 end
101 class TKwinit
102 super TokenKeyword
103 end
104 class TKwredef
105 super TokenKeyword
106 end
107 class TKwis
108 super TokenKeyword
109 end
110 class TKwdo
111 super TokenKeyword
112 end
113 class TKwreadable
114 super TokenKeyword
115 end
116 class TKwwritable
117 super TokenKeyword
118 end
119 class TKwvar
120 super TokenKeyword
121 end
122 class TKwintern
123 super TokenKeyword
124 end
125 class TKwextern
126 super TokenKeyword
127 end
128 class TKwprotected
129 super TokenKeyword
130 end
131 class TKwprivate
132 super TokenKeyword
133 end
134 class TKwintrude
135 super TokenKeyword
136 end
137 class TKwif
138 super TokenKeyword
139 end
140 class TKwthen
141 super TokenKeyword
142 end
143 class TKwelse
144 super TokenKeyword
145 end
146 class TKwwhile
147 super TokenKeyword
148 end
149 class TKwloop
150 super TokenKeyword
151 end
152 class TKwfor
153 super TokenKeyword
154 end
155 class TKwin
156 super TokenKeyword
157 end
158 class TKwand
159 super TokenKeyword
160 end
161 class TKwor
162 super TokenKeyword
163 end
164 class TKwnot
165 super TokenKeyword
166 end
167 class TKwreturn
168 super TokenKeyword
169 end
170 class TKwcontinue
171 super TokenKeyword
172 end
173 class TKwbreak
174 super TokenKeyword
175 end
176 class TKwabort
177 super TokenKeyword
178 end
179 class TKwassert
180 super TokenKeyword
181 end
182 class TKwnew
183 super TokenKeyword
184 end
185 class TKwisa
186 super TokenKeyword
187 end
188 class TKwonce
189 super TokenKeyword
190 end
191 class TKwsuper
192 super TokenKeyword
193 end
194 class TKwself
195 super TokenKeyword
196 end
197 class TKwtrue
198 super TokenKeyword
199 end
200 class TKwfalse
201 super TokenKeyword
202 end
203 class TKwnull
204 super TokenKeyword
205 end
206 class TKwas
207 super TokenKeyword
208 end
209 class TKwnullable
210 super TokenKeyword
211 end
212 class TKwisset
213 super TokenKeyword
214 end
215 class TKwlabel
216 super TokenKeyword
217 end
218 class TKwdebug
219 super Token
220 end
221 class TOpar
222 super Token
223 end
224 class TCpar
225 super Token
226 end
227 class TObra
228 super Token
229 end
230 class TCbra
231 super Token
232 end
233 class TComma
234 super Token
235 end
236 class TColumn
237 super Token
238 end
239 class TQuad
240 super Token
241 end
242 class TAssign
243 super Token
244 end
245 abstract class TokenOperator
246 super Token
247 redef fun to_s
248 do
249 return "operator '{text}'"
250 end
251 end
252 class TPluseq
253 super TokenOperator
254 end
255 class TMinuseq
256 super TokenOperator
257 end
258 class TDotdotdot
259 super TokenOperator
260 end
261 class TDotdot
262 super TokenOperator
263 end
264 class TDot
265 super TokenOperator
266 end
267 class TPlus
268 super TokenOperator
269 end
270 class TMinus
271 super TokenOperator
272 end
273 class TStar
274 super TokenOperator
275 end
276 class TSlash
277 super TokenOperator
278 end
279 class TPercent
280 super TokenOperator
281 end
282 class TEq
283 super TokenOperator
284 end
285 class TNe
286 super TokenOperator
287 end
288 class TLt
289 super TokenOperator
290 end
291 class TLe
292 super TokenOperator
293 end
294 class TLl
295 super TokenOperator
296 end
297 class TGt
298 super TokenOperator
299 end
300 class TGe
301 super TokenOperator
302 end
303 class TGg
304 super TokenOperator
305 end
306 class TStarship
307 super TokenOperator
308 end
309 class TBang
310 super TokenOperator
311 end
312 class TClassid
313 super Token
314 redef fun to_s
315 do
316 do return "type identifier '{text}'"
317 end
318 end
319 class TId
320 super Token
321 redef fun to_s
322 do
323 do return "identifier '{text}'"
324 end
325 end
326 class TAttrid
327 super Token
328 redef fun to_s
329 do
330 do return "attribute '{text}'"
331 end
332 end
333 abstract class TokenLiteral
334 super Token
335 redef fun to_s
336 do
337 do return "literal value '{text}'"
338 end
339 end
340 class TNumber
341 super TokenLiteral
342 end
343 class TFloat
344 super TokenLiteral
345 end
346 class TChar
347 super TokenLiteral
348 end
349 class TString
350 super TokenLiteral
351 end
352 class TStartString
353 super TokenLiteral
354 end
355 class TMidString
356 super TokenLiteral
357 end
358 class TEndString
359 super Token
360 end
361 class TBadString
362 super Token
363 redef fun to_s
364 do
365 do return "malformed string {text}"
366 end
367 end
368 class TBadChar
369 super Token
370 redef fun to_s
371 do
372 do return "malformed character {text}"
373 end
374 end
375 class TExternCodeSegment
376 super Token
377 end
378 class EOF
379 super Token
380 redef fun to_s
381 do
382 return "end of file"
383 end
384 end
385 class AError
386 super EOF
387 end
388 class ALexerError
389 super AError
390 end
391 class AParserError
392 super AError
393 end
394
395 class AModule
396 super Prod
397 readable var _n_moduledecl: nullable AModuledecl = null
398 readable var _n_imports: List[AImport] = new List[AImport]
399 readable var _n_extern_code_blocks: List[AExternCodeBlock] = new List[AExternCodeBlock]
400 readable var _n_classdefs: List[AClassdef] = new List[AClassdef]
401 end
402 class AModuledecl
403 super Prod
404 readable var _n_doc: nullable ADoc = null
405 readable var _n_kwmodule: TKwmodule
406 readable var _n_name: AModuleName
407 end
408 abstract class AImport super Prod end
409 class AStdImport
410 super AImport
411 readable var _n_visibility: AVisibility
412 readable var _n_kwimport: TKwimport
413 readable var _n_name: AModuleName
414 end
415 class ANoImport
416 super AImport
417 readable var _n_visibility: AVisibility
418 readable var _n_kwimport: TKwimport
419 readable var _n_kwend: TKwend
420 end
421 abstract class AVisibility super Prod end
422 class APublicVisibility
423 super AVisibility
424 end
425 class APrivateVisibility
426 super AVisibility
427 readable var _n_kwprivate: TKwprivate
428 end
429 class AProtectedVisibility
430 super AVisibility
431 readable var _n_kwprotected: TKwprotected
432 end
433 class AIntrudeVisibility
434 super AVisibility
435 readable var _n_kwintrude: TKwintrude
436 end
437 abstract class AClassdef super Prod
438 readable var _n_propdefs: List[APropdef] = new List[APropdef]
439 end
440 class AStdClassdef
441 super AClassdef
442 readable var _n_doc: nullable ADoc = null
443 readable var _n_kwredef: nullable TKwredef = null
444 readable var _n_visibility: AVisibility
445 readable var _n_classkind: AClasskind
446 readable var _n_id: nullable TClassid = null
447 readable var _n_formaldefs: List[AFormaldef] = new List[AFormaldef]
448 readable var _n_extern_code_block: nullable AExternCodeBlock = null
449 readable var _n_superclasses: List[ASuperclass] = new List[ASuperclass]
450 readable var _n_kwend: TKwend
451 redef fun hot_location do return n_id.location
452 end
453 class ATopClassdef
454 super AClassdef
455 end
456 class AMainClassdef
457 super AClassdef
458 end
459 abstract class AClasskind super Prod end
460 class AConcreteClasskind
461 super AClasskind
462 readable var _n_kwclass: TKwclass
463 end
464 class AAbstractClasskind
465 super AClasskind
466 readable var _n_kwabstract: TKwabstract
467 readable var _n_kwclass: TKwclass
468 end
469 class AInterfaceClasskind
470 super AClasskind
471 readable var _n_kwinterface: TKwinterface
472 end
473 class AEnumClasskind
474 super AClasskind
475 readable var _n_kwenum: TKwenum
476 end
477 class AExternClasskind
478 super AClasskind
479 readable var _n_kwextern: TKwextern
480 readable var _n_kwclass: nullable TKwclass = null
481 end
482 class AFormaldef
483 super Prod
484 readable var _n_id: TClassid
485 readable var _n_type: nullable AType = null
486 end
487 class ASuperclass
488 super Prod
489 readable var _n_kwsuper: TKwsuper
490 readable var _n_type: AType
491 end
492 abstract class APropdef super Prod
493 readable var _n_doc: nullable ADoc = null
494 end
495 class AAttrPropdef
496 super APropdef
497 readable var _n_kwredef: nullable TKwredef = null
498 readable var _n_visibility: AVisibility
499 readable var _n_kwvar: TKwvar
500 readable var _n_id: nullable TAttrid
501 readable var _n_id2: nullable TId
502 readable var _n_type: nullable AType = null
503 readable var _n_readable: nullable AAble = null
504 readable var _n_writable: nullable AAble = null
505 readable var _n_expr: nullable AExpr = null
506 redef fun hot_location
507 do
508 if n_id != null then return n_id.location else return n_id2.location
509 end
510 end
511 abstract class AMethPropdef
512 super APropdef
513 readable var _n_kwredef: nullable TKwredef = null
514 readable var _n_visibility: nullable AVisibility
515 readable var _n_methid: nullable AMethid = null
516 readable var _n_signature: nullable ASignature
517 redef fun hot_location
518 do
519 if n_methid != null then
520 return n_methid.location
521 else
522 return location
523 end
524 end
525 end
526 class ADeferredMethPropdef
527 super AMethPropdef
528 readable var _n_kwmeth: TKwmeth
529 end
530 class AInternMethPropdef
531 super AMethPropdef
532 readable var _n_kwmeth: TKwmeth
533 end
534 abstract class AExternPropdef
535 super AMethPropdef
536 readable var _n_extern: nullable TString = null
537 readable var _n_extern_calls: nullable AExternCalls = null
538 readable var _n_extern_code_block: nullable AExternCodeBlock = null
539 end
540 class AExternMethPropdef
541 super AMethPropdef
542 super AExternPropdef
543 readable var _n_kwmeth: TKwmeth
544 end
545 class AConcreteMethPropdef
546 super AMethPropdef
547 readable var _n_kwmeth: nullable TKwmeth
548 readable var _n_block: nullable AExpr = null
549 end
550 abstract class AInitPropdef
551 super AMethPropdef
552 end
553 class AConcreteInitPropdef
554 super AConcreteMethPropdef
555 super AInitPropdef
556 readable var _n_kwinit: TKwinit
557 redef fun hot_location do return n_kwinit.location
558 end
559 class AExternInitPropdef
560 super AExternPropdef
561 super AInitPropdef
562 readable var _n_kwnew: TKwnew
563 end
564 class AMainMethPropdef
565 super AConcreteMethPropdef
566 end
567 class AExternCalls
568 super Prod
569 readable var _n_kwimport: TKwimport
570 readable var _n_extern_calls: List[AExternCall] = new List[AExternCall]
571 end
572 abstract class AExternCall
573 super Prod
574 end
575 abstract class APropExternCall
576 super AExternCall
577 end
578 class ALocalPropExternCall
579 super APropExternCall
580 readable var _n_methid: AMethid
581 end
582 class AFullPropExternCall
583 super APropExternCall
584 readable var _n_classid: TClassid
585 readable var _n_quad: nullable TQuad = null
586 readable var _n_methid: AMethid
587 end
588 class AInitPropExternCall
589 super APropExternCall
590 readable var _n_classid: TClassid
591 end
592 class ASuperExternCall
593 super AExternCall
594 readable var _n_kwsuper: TKwsuper
595 end
596 abstract class ACastExternCall
597 super AExternCall
598 end
599 class ACastAsExternCall
600 super ACastExternCall
601 readable var _n_from_type: AType
602 readable var _n_kwas: TKwas
603 readable var _n_to_type: AType
604 end
605 class AAsNullableExternCall
606 super ACastExternCall
607 readable var _n_type: AType
608 readable var _n_kwas: TKwas
609 readable var _n_kwnullable: TKwnullable
610 end
611 class AAsNotNullableExternCall
612 super ACastExternCall
613 readable var _n_type: AType
614 readable var _n_kwas: TKwas
615 readable var _n_kwnot: TKwnot
616 readable var _n_kwnullable: TKwnullable
617 end
618 class ATypePropdef
619 super APropdef
620 readable var _n_kwredef: nullable TKwredef = null
621 readable var _n_visibility: AVisibility
622 readable var _n_kwtype: TKwtype
623 readable var _n_id: TClassid
624 readable var _n_type: AType
625 end
626 abstract class AAble super Prod
627 readable var _n_visibility: nullable AVisibility = null
628 readable var _n_kwredef: nullable TKwredef = null
629 end
630 class AReadAble
631 super AAble
632 readable var _n_kwreadable: TKwreadable
633 end
634 class AWriteAble
635 super AAble
636 readable var _n_kwwritable: TKwwritable
637 end
638 abstract class AMethid super Prod end
639 class AIdMethid
640 super AMethid
641 readable var _n_id: TId
642 end
643 class APlusMethid
644 super AMethid
645 readable var _n_plus: TPlus
646 end
647 class AMinusMethid
648 super AMethid
649 readable var _n_minus: TMinus
650 end
651 class AStarMethid
652 super AMethid
653 readable var _n_star: TStar
654 end
655 class ASlashMethid
656 super AMethid
657 readable var _n_slash: TSlash
658 end
659 class APercentMethid
660 super AMethid
661 readable var _n_percent: TPercent
662 end
663 class AEqMethid
664 super AMethid
665 readable var _n_eq: TEq
666 end
667 class ANeMethid
668 super AMethid
669 readable var _n_ne: TNe
670 end
671 class ALeMethid
672 super AMethid
673 readable var _n_le: TLe
674 end
675 class AGeMethid
676 super AMethid
677 readable var _n_ge: TGe
678 end
679 class ALtMethid
680 super AMethid
681 readable var _n_lt: TLt
682 end
683 class AGtMethid
684 super AMethid
685 readable var _n_gt: TGt
686 end
687 class ALlMethid
688 super AMethid
689 readable writable var _n_ll: TLl
690 end
691 class AGgMethid
692 super AMethid
693 readable writable var _n_gg: TGg
694 end
695 class ABraMethid
696 super AMethid
697 readable var _n_obra: TObra
698 readable var _n_cbra: TCbra
699 end
700 class AStarshipMethid
701 super AMethid
702 readable var _n_starship: TStarship
703 end
704 class AAssignMethid
705 super AMethid
706 readable var _n_id: TId
707 readable var _n_assign: TAssign
708 end
709 class ABraassignMethid
710 super AMethid
711 readable var _n_obra: TObra
712 readable var _n_cbra: TCbra
713 readable var _n_assign: TAssign
714 end
715 class ASignature
716 super Prod
717 readable var _n_opar: nullable TOpar = null
718 readable var _n_params: List[AParam] = new List[AParam]
719 readable var _n_cpar: nullable TCpar = null
720 readable var _n_type: nullable AType = null
721 readable var _n_closure_decls: List[AClosureDecl] = new List[AClosureDecl]
722 end
723 class AParam
724 super Prod
725 readable var _n_id: TId
726 readable var _n_type: nullable AType = null
727 readable var _n_dotdotdot: nullable TDotdotdot = null
728 end
729 class AClosureDecl
730 super Prod
731 readable var _n_kwbreak: nullable TKwbreak = null
732 readable var _n_bang: TBang
733 readable var _n_id: TId
734 readable var _n_signature: ASignature
735 readable var _n_expr: nullable AExpr = null
736 end
737 class AType
738 super Prod
739 readable var _n_kwnullable: nullable TKwnullable = null
740 readable var _n_id: TClassid
741 readable var _n_types: List[AType] = new List[AType]
742 end
743 class ALabel
744 super Prod
745 readable var _n_kwlabel: TKwlabel
746 readable var _n_id: TId
747 end
748 abstract class AExpr super Prod end
749 class ABlockExpr
750 super AExpr
751 readable var _n_expr: List[AExpr] = new List[AExpr]
752 readable var _n_kwend: nullable TKwend = null
753 end
754 class AVardeclExpr
755 super AExpr
756 readable var _n_kwvar: TKwvar
757 readable var _n_id: TId
758 readable var _n_type: nullable AType = null
759 readable var _n_assign: nullable TAssign = null
760 readable var _n_expr: nullable AExpr = null
761 end
762 class AReturnExpr
763 super AExpr
764 readable var _n_kwreturn: nullable TKwreturn = null
765 readable var _n_expr: nullable AExpr = null
766 end
767 abstract class ALabelable
768 super Prod
769 readable var _n_label: nullable ALabel = null
770 end
771 class ABreakExpr
772 super AExpr
773 super ALabelable
774 readable var _n_kwbreak: TKwbreak
775 readable var _n_expr: nullable AExpr = null
776 end
777 class AAbortExpr
778 super AExpr
779 readable var _n_kwabort: TKwabort
780 end
781 class AContinueExpr
782 super AExpr
783 super ALabelable
784 readable var _n_kwcontinue: nullable TKwcontinue = null
785 readable var _n_expr: nullable AExpr = null
786 end
787 class ADoExpr
788 super AExpr
789 super ALabelable
790 readable var _n_kwdo: TKwdo
791 readable var _n_block: nullable AExpr = null
792 end
793 class AIfExpr
794 super AExpr
795 readable var _n_kwif: TKwif
796 readable var _n_expr: AExpr
797 readable var _n_then: nullable AExpr = null
798 readable var _n_else: nullable AExpr = null
799 end
800 class AIfexprExpr
801 super AExpr
802 readable var _n_kwif: TKwif
803 readable var _n_expr: AExpr
804 readable var _n_kwthen: TKwthen
805 readable var _n_then: AExpr
806 readable var _n_kwelse: TKwelse
807 readable var _n_else: AExpr
808 end
809 class AWhileExpr
810 super AExpr
811 super ALabelable
812 readable var _n_kwwhile: TKwwhile
813 readable var _n_expr: AExpr
814 readable var _n_kwdo: TKwdo
815 readable var _n_block: nullable AExpr = null
816 end
817 class ALoopExpr
818 super AExpr
819 super ALabelable
820 readable var _n_kwloop: TKwloop
821 readable var _n_block: nullable AExpr = null
822 end
823 class AForExpr
824 super AExpr
825 super ALabelable
826 readable var _n_kwfor: TKwfor
827 readable var _n_ids: List[TId] = new List[TId]
828 readable var _n_expr: AExpr
829 readable var _n_kwdo: TKwdo
830 readable var _n_block: nullable AExpr = null
831 end
832 class AAssertExpr
833 super AExpr
834 readable var _n_kwassert: TKwassert
835 readable var _n_id: nullable TId = null
836 readable var _n_expr: AExpr
837 readable var _n_else: nullable AExpr = null
838 end
839 abstract class AAssignFormExpr
840 super AExpr
841 readable var _n_assign: TAssign
842 readable var _n_value: AExpr
843 end
844 abstract class AReassignFormExpr
845 super AExpr
846 readable var _n_assign_op: AAssignOp
847 readable var _n_value: AExpr
848 end
849 class AOnceExpr
850 super AProxyExpr
851 readable var _n_kwonce: TKwonce
852 end
853 abstract class ASendExpr
854 super AExpr
855 readable var _n_expr: AExpr
856 readable var _n_closure_defs: List[AClosureDef] = new List[AClosureDef]
857 end
858 abstract class ABinopExpr
859 super ASendExpr
860 readable var _n_expr2: AExpr
861 end
862 abstract class ABoolExpr
863 super AExpr
864 end
865 class AOrExpr
866 super ABoolExpr
867 readable var _n_expr: AExpr
868 readable var _n_expr2: AExpr
869 end
870 class AAndExpr
871 super ABoolExpr
872 readable var _n_expr: AExpr
873 readable var _n_expr2: AExpr
874 end
875 class AOrElseExpr
876 super ABoolExpr
877 readable var _n_expr: AExpr
878 readable var _n_expr2: AExpr
879 end
880 class ANotExpr
881 super ABoolExpr
882 readable var _n_kwnot: TKwnot
883 readable var _n_expr: AExpr
884 end
885 class AEqExpr
886 super ABinopExpr
887 end
888 class AEeExpr
889 super ABoolExpr
890 readable var _n_expr: AExpr
891 readable var _n_expr2: AExpr
892 end
893 class ANeExpr
894 super ABinopExpr
895 end
896 class ALtExpr
897 super ABinopExpr
898 end
899 class ALeExpr
900 super ABinopExpr
901 end
902 class ALlExpr
903 super ABinopExpr
904 end
905 class AGtExpr
906 super ABinopExpr
907 end
908 class AGeExpr
909 super ABinopExpr
910 end
911 class AGgExpr
912 super ABinopExpr
913 end
914 class AIsaExpr
915 super ABoolExpr
916 readable var _n_expr: AExpr
917 readable var _n_type: AType
918 end
919 class APlusExpr
920 super ABinopExpr
921 end
922 class AMinusExpr
923 super ABinopExpr
924 end
925 class AStarshipExpr
926 super ABinopExpr
927 end
928 class AStarExpr
929 super ABinopExpr
930 end
931 class ASlashExpr
932 super ABinopExpr
933 end
934 class APercentExpr
935 super ABinopExpr
936 end
937 class AUminusExpr
938 super ASendExpr
939 readable var _n_minus: TMinus
940 end
941 class ANewExpr
942 super AExpr
943 readable var _n_kwnew: TKwnew
944 readable var _n_type: AType
945 readable var _n_id: nullable TId = null
946 readable var _n_args: AExprs
947 end
948 abstract class AAttrFormExpr
949 super AExpr
950 readable var _n_expr: AExpr
951 readable var _n_id: TAttrid
952 end
953 class AAttrExpr
954 super AAttrFormExpr
955 end
956 class AAttrAssignExpr
957 super AAttrFormExpr
958 super AAssignFormExpr
959 end
960 abstract class ACallFormExpr
961 super ASendExpr
962 readable var _n_id: TId
963 readable var _n_args: AExprs
964 end
965 abstract class ASendReassignFormExpr
966 super ASendExpr
967 super AReassignFormExpr
968 end
969 class AAttrReassignExpr
970 super AExpr
971 super AAttrFormExpr
972 super AReassignFormExpr
973 end
974 class ACallExpr
975 super ACallFormExpr
976 end
977 class ACallAssignExpr
978 super ACallFormExpr
979 super AAssignFormExpr
980 end
981 class ACallReassignExpr
982 super AExpr
983 super ACallFormExpr
984 super ASendReassignFormExpr
985 end
986 class ASuperExpr
987 super AExpr
988 readable var _n_qualified: nullable AQualified = null
989 readable var _n_kwsuper: TKwsuper
990 readable var _n_args: AExprs
991 end
992 class AInitExpr
993 super ASendExpr
994 readable var _n_kwinit: TKwinit
995 readable var _n_args: AExprs
996 end
997 abstract class ABraFormExpr
998 super ASendExpr
999 readable var _n_args: AExprs
1000 end
1001 class ABraExpr
1002 super ABraFormExpr
1003 end
1004 class ABraAssignExpr
1005 super ABraFormExpr
1006 super AAssignFormExpr
1007 end
1008 abstract class AVarFormExpr
1009 super AExpr
1010 readable var _n_id: TId
1011 end
1012 class ABraReassignExpr
1013 super ABraFormExpr
1014 super ASendReassignFormExpr
1015 end
1016 class AClosureCallExpr
1017 super AExpr
1018 readable var _n_id: TId
1019 readable var _n_args: AExprs
1020 readable var _n_closure_defs: List[AClosureDef] = new List[AClosureDef]
1021 end
1022 class AVarExpr
1023 super AVarFormExpr
1024 end
1025 class AVarAssignExpr
1026 super AVarFormExpr
1027 super AAssignFormExpr
1028 end
1029 class AVarReassignExpr
1030 super AVarFormExpr
1031 super AReassignFormExpr
1032 end
1033 abstract class ARangeExpr
1034 super AExpr
1035 readable var _n_expr: AExpr
1036 readable var _n_expr2: AExpr
1037 end
1038 class ACrangeExpr
1039 super ARangeExpr
1040 readable var _n_obra: TObra
1041 readable var _n_cbra: TCbra
1042 end
1043 class AOrangeExpr
1044 super ARangeExpr
1045 readable var _n_obra: TObra
1046 readable var _n_cbra: TObra
1047 end
1048 class AArrayExpr
1049 super AExpr
1050 readable var _n_exprs: AExprs
1051 end
1052 class ASelfExpr
1053 super AExpr
1054 readable var _n_kwself: nullable TKwself
1055 end
1056 class AImplicitSelfExpr
1057 super ASelfExpr
1058 end
1059 class ATrueExpr
1060 super ABoolExpr
1061 readable var _n_kwtrue: TKwtrue
1062 end
1063 class AFalseExpr
1064 super ABoolExpr
1065 readable var _n_kwfalse: TKwfalse
1066 end
1067 class ANullExpr
1068 super AExpr
1069 readable var _n_kwnull: TKwnull
1070 end
1071 class AIntExpr
1072 super AExpr
1073 readable var _n_number: TNumber
1074 end
1075 class AFloatExpr
1076 super AExpr
1077 readable var _n_float: TFloat
1078 end
1079 class ACharExpr
1080 super AExpr
1081 readable var _n_char: TChar
1082 end
1083 abstract class AStringFormExpr
1084 super AExpr
1085 readable var _n_string: Token
1086 end
1087 class AStringExpr
1088 super AStringFormExpr
1089 end
1090 class AStartStringExpr
1091 super AStringFormExpr
1092 end
1093 class AMidStringExpr
1094 super AStringFormExpr
1095 end
1096 class AEndStringExpr
1097 super AStringFormExpr
1098 end
1099 class ASuperstringExpr
1100 super AExpr
1101 readable var _n_exprs: List[AExpr] = new List[AExpr]
1102 end
1103 class AParExpr
1104 super AProxyExpr
1105 readable var _n_opar: TOpar
1106 readable var _n_cpar: TCpar
1107 end
1108 abstract class AProxyExpr
1109 super AExpr
1110 readable var _n_expr: AExpr
1111 end
1112 class AAsCastExpr
1113 super AExpr
1114 readable var _n_expr: AExpr
1115 readable var _n_kwas: TKwas
1116 readable var _n_opar: TOpar
1117 readable var _n_type: AType
1118 readable var _n_cpar: TCpar
1119 end
1120 class AAsNotnullExpr
1121 super AExpr
1122 readable var _n_expr: AExpr
1123 readable var _n_kwas: TKwas
1124 readable var _n_opar: TOpar
1125 readable var _n_kwnot: TKwnot
1126 readable var _n_kwnull: TKwnull
1127 readable var _n_cpar: TCpar
1128 end
1129 class AIssetAttrExpr
1130 super AAttrFormExpr
1131 readable var _n_kwisset: TKwisset
1132 end
1133 abstract class AExprs
1134 super Prod
1135 readable var _n_exprs: List[AExpr] = new List[AExpr]
1136 end
1137 class ADebugTypeExpr
1138 super AExpr
1139 readable var _n_kwdebug: TKwdebug
1140 readable var _n_kwtype: TKwtype
1141 readable var _n_expr: AExpr
1142 readable var _n_type: AType
1143 end
1144 class AListExprs
1145 super AExprs
1146 end
1147 class AParExprs
1148 super AExprs
1149 readable var _n_opar: TOpar
1150 readable var _n_cpar: TCpar
1151 end
1152 class ABraExprs
1153 super AExprs
1154 readable var _n_obra: TObra
1155 readable var _n_cbra: TCbra
1156 end
1157 abstract class AAssignOp super Prod end
1158 class APlusAssignOp
1159 super AAssignOp
1160 readable var _n_pluseq: TPluseq
1161 end
1162 class AMinusAssignOp
1163 super AAssignOp
1164 readable var _n_minuseq: TMinuseq
1165 end
1166 class AClosureDef
1167 super ALabelable
1168 readable var _n_bang: TBang
1169 readable var _n_id: AClosureId
1170 readable var _n_ids: List[TId] = new List[TId]
1171 readable var _n_kwdo: nullable TKwdo = null
1172 readable var _n_expr: nullable AExpr = null
1173 redef fun hot_location do return n_id.location
1174 end
1175 abstract class AClosureId
1176 super Prod
1177 end
1178 class ASimpleClosureId
1179 super AClosureId
1180 readable var _n_id: TId
1181 end
1182 class ABreakClosureId
1183 super AClosureId
1184 readable var _n_kwbreak: TKwbreak
1185 end
1186 class AModuleName
1187 super Prod
1188 readable var _n_quad: nullable TQuad = null
1189 readable var _n_path: List[TId] = new List[TId]
1190 readable var _n_id: TId
1191 end
1192 class AInLanguage
1193 super Prod
1194 readable var _n_kwin: TKwin
1195 readable var _n_string: TString
1196 end
1197 class AExternCodeBlock
1198 super Prod
1199 readable var _n_in_language: nullable AInLanguage = null
1200 readable var _n_extern_code_segment: TExternCodeSegment
1201 end
1202 class AQualified
1203 super Prod
1204 readable var _n_quad: nullable TQuad = null
1205 readable var _n_id: List[TId] = new List[TId]
1206 readable var _n_classid: nullable TClassid = null
1207 end
1208 class ADoc
1209 super Prod
1210 readable var _n_comment: List[TComment] = new List[TComment]
1211 end
1212
1213 class Start
1214 super Prod
1215 readable var _n_base: nullable AModule
1216 readable var _n_eof: EOF
1217 init(n_base: nullable AModule, n_eof: EOF)
1218 do
1219 self._n_base = n_base
1220 self._n_eof = n_eof
1221 end
1222 end