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