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