parser: remove 'special' keyword
[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 private init noinit do end
380 redef fun to_s
381 do
382 return "end of file"
383 end
384 end
385 class AError
386 super EOF
387 private init noinit do end
388 end
389
390 class AModule
391 super Prod
392 readable var _n_moduledecl: nullable AModuledecl = null
393 readable var _n_imports: List[AImport] = new List[AImport]
394 readable var _n_extern_code_blocks: List[AExternCodeBlock] = new List[AExternCodeBlock]
395 readable var _n_classdefs: List[AClassdef] = new List[AClassdef]
396 end
397 class AModuledecl
398 super Prod
399 readable var _n_doc: nullable ADoc = null
400 readable var _n_kwmodule: TKwmodule
401 readable var _n_name: AModuleName
402 end
403 abstract class AImport super Prod end
404 class AStdImport
405 super AImport
406 readable var _n_visibility: AVisibility
407 readable var _n_kwimport: TKwimport
408 readable var _n_name: AModuleName
409 end
410 class ANoImport
411 super AImport
412 readable var _n_visibility: AVisibility
413 readable var _n_kwimport: TKwimport
414 readable var _n_kwend: TKwend
415 end
416 abstract class AVisibility super Prod end
417 class APublicVisibility
418 super AVisibility
419 end
420 class APrivateVisibility
421 super AVisibility
422 readable var _n_kwprivate: TKwprivate
423 end
424 class AProtectedVisibility
425 super AVisibility
426 readable var _n_kwprotected: TKwprotected
427 end
428 class AIntrudeVisibility
429 super AVisibility
430 readable var _n_kwintrude: TKwintrude
431 end
432 abstract class AClassdef super Prod
433 readable var _n_propdefs: List[APropdef] = new List[APropdef]
434 end
435 class AStdClassdef
436 super AClassdef
437 readable var _n_doc: nullable ADoc = null
438 readable var _n_kwredef: nullable TKwredef = null
439 readable var _n_visibility: AVisibility
440 readable var _n_classkind: AClasskind
441 readable var _n_id: nullable TClassid = null
442 readable var _n_formaldefs: List[AFormaldef] = new List[AFormaldef]
443 readable var _n_extern_code_block: nullable AExternCodeBlock = null
444 readable var _n_superclasses: List[ASuperclass] = new List[ASuperclass]
445 readable var _n_kwend: TKwend
446 redef fun hot_location do return n_id.location
447 end
448 class ATopClassdef
449 super AClassdef
450 end
451 class AMainClassdef
452 super AClassdef
453 end
454 abstract class AClasskind super Prod end
455 class AConcreteClasskind
456 super AClasskind
457 readable var _n_kwclass: TKwclass
458 end
459 class AAbstractClasskind
460 super AClasskind
461 readable var _n_kwabstract: TKwabstract
462 readable var _n_kwclass: TKwclass
463 end
464 class AInterfaceClasskind
465 super AClasskind
466 readable var _n_kwinterface: TKwinterface
467 end
468 class AEnumClasskind
469 super AClasskind
470 readable var _n_kwenum: TKwenum
471 end
472 class AExternClasskind
473 super AClasskind
474 readable var _n_kwextern: TKwextern
475 end
476 class AFormaldef
477 super Prod
478 readable var _n_id: TClassid
479 readable var _n_type: nullable AType = null
480 end
481 class ASuperclass
482 super Prod
483 readable var _n_kwsuper: TKwsuper
484 readable var _n_type: AType
485 end
486 abstract class APropdef super Prod
487 readable var _n_doc: nullable ADoc = null
488 end
489 class AAttrPropdef
490 super APropdef
491 readable var _n_kwredef: nullable TKwredef = null
492 readable var _n_visibility: AVisibility
493 readable var _n_kwvar: TKwvar
494 readable var _n_id: nullable TAttrid
495 readable var _n_id2: nullable TId
496 readable var _n_type: nullable AType = null
497 readable var _n_readable: nullable AAble = null
498 readable var _n_writable: nullable AAble = null
499 readable var _n_expr: nullable AExpr = null
500 redef fun hot_location
501 do
502 if n_id != null then return n_id.location else return n_id2.location
503 end
504 end
505 abstract class AMethPropdef
506 super APropdef
507 readable var _n_kwredef: nullable TKwredef = null
508 readable var _n_visibility: nullable AVisibility
509 readable var _n_methid: nullable AMethid = null
510 readable var _n_signature: nullable ASignature
511 redef fun hot_location
512 do
513 if n_methid != null then
514 return n_methid.location
515 else
516 return location
517 end
518 end
519 end
520 class ADeferredMethPropdef
521 super AMethPropdef
522 readable var _n_kwmeth: TKwmeth
523 end
524 class AInternMethPropdef
525 super AMethPropdef
526 readable var _n_kwmeth: TKwmeth
527 end
528 abstract class AExternPropdef
529 super AMethPropdef
530 readable var _n_extern: nullable TString = null
531 readable var _n_extern_calls: nullable AExternCalls = null
532 readable var _n_extern_code_block: nullable AExternCodeBlock = null
533 end
534 class AExternMethPropdef
535 super AMethPropdef
536 super AExternPropdef
537 readable var _n_kwmeth: TKwmeth
538 end
539 class AConcreteMethPropdef
540 super AMethPropdef
541 readable var _n_kwmeth: nullable TKwmeth
542 readable var _n_block: nullable AExpr = null
543 end
544 abstract class AInitPropdef
545 super AMethPropdef
546 end
547 class AConcreteInitPropdef
548 super AConcreteMethPropdef
549 super AInitPropdef
550 readable var _n_kwinit: TKwinit
551 redef fun hot_location do return n_kwinit.location
552 end
553 class AExternInitPropdef
554 super AExternPropdef
555 super AInitPropdef
556 readable var _n_kwnew: TKwnew
557 end
558 class AMainMethPropdef
559 super AConcreteMethPropdef
560 end
561 class AExternCalls
562 super Prod
563 readable var _n_kwimport: TKwimport
564 readable var _n_extern_calls: List[AExternCall] = new List[AExternCall]
565 end
566 abstract class AExternCall
567 super Prod
568 end
569 abstract class APropExternCall
570 super AExternCall
571 end
572 class ALocalPropExternCall
573 super APropExternCall
574 readable var _n_methid: AMethid
575 end
576 class AFullPropExternCall
577 super APropExternCall
578 readable var _n_classid: TClassid
579 readable var _n_quad: nullable TQuad = null
580 readable var _n_methid: AMethid
581 end
582 class AInitPropExternCall
583 super APropExternCall
584 readable var _n_classid: TClassid
585 end
586 class ASuperExternCall
587 super AExternCall
588 readable var _n_kwsuper: TKwsuper
589 end
590 abstract class ACastExternCall
591 super AExternCall
592 end
593 class ACastAsExternCall
594 super ACastExternCall
595 readable var _n_from_type: AType
596 readable var _n_kwas: TKwas
597 readable var _n_to_type: AType
598 end
599 class AAsNullableExternCall
600 super ACastExternCall
601 readable var _n_type: AType
602 readable var _n_kwas: TKwas
603 readable var _n_kwnullable: TKwnullable
604 end
605 class AAsNotNullableExternCall
606 super ACastExternCall
607 readable var _n_type: AType
608 readable var _n_kwas: TKwas
609 readable var _n_kwnot: TKwnot
610 readable var _n_kwnullable: TKwnullable
611 end
612 class ATypePropdef
613 super APropdef
614 readable var _n_kwredef: nullable TKwredef = null
615 readable var _n_visibility: AVisibility
616 readable var _n_kwtype: TKwtype
617 readable var _n_id: TClassid
618 readable var _n_type: AType
619 end
620 abstract class AAble super Prod
621 readable var _n_visibility: nullable AVisibility = null
622 readable var _n_kwredef: nullable TKwredef = null
623 end
624 class AReadAble
625 super AAble
626 readable var _n_kwreadable: TKwreadable
627 end
628 class AWriteAble
629 super AAble
630 readable var _n_kwwritable: TKwwritable
631 end
632 abstract class AMethid super Prod end
633 class AIdMethid
634 super AMethid
635 readable var _n_id: TId
636 end
637 class APlusMethid
638 super AMethid
639 readable var _n_plus: TPlus
640 end
641 class AMinusMethid
642 super AMethid
643 readable var _n_minus: TMinus
644 end
645 class AStarMethid
646 super AMethid
647 readable var _n_star: TStar
648 end
649 class ASlashMethid
650 super AMethid
651 readable var _n_slash: TSlash
652 end
653 class APercentMethid
654 super AMethid
655 readable var _n_percent: TPercent
656 end
657 class AEqMethid
658 super AMethid
659 readable var _n_eq: TEq
660 end
661 class ANeMethid
662 super AMethid
663 readable var _n_ne: TNe
664 end
665 class ALeMethid
666 super AMethid
667 readable var _n_le: TLe
668 end
669 class AGeMethid
670 super AMethid
671 readable var _n_ge: TGe
672 end
673 class ALtMethid
674 super AMethid
675 readable var _n_lt: TLt
676 end
677 class AGtMethid
678 super AMethid
679 readable var _n_gt: TGt
680 end
681 class ALlMethid
682 super AMethid
683 readable writable var _n_ll: TLl
684 end
685 class AGgMethid
686 super AMethid
687 readable writable var _n_gg: TGg
688 end
689 class ABraMethid
690 super AMethid
691 readable var _n_obra: TObra
692 readable var _n_cbra: TCbra
693 end
694 class AStarshipMethid
695 super AMethid
696 readable var _n_starship: TStarship
697 end
698 class AAssignMethid
699 super AMethid
700 readable var _n_id: TId
701 readable var _n_assign: TAssign
702 end
703 class ABraassignMethid
704 super AMethid
705 readable var _n_obra: TObra
706 readable var _n_cbra: TCbra
707 readable var _n_assign: TAssign
708 end
709 class ASignature
710 super Prod
711 readable var _n_opar: nullable TOpar = null
712 readable var _n_params: List[AParam] = new List[AParam]
713 readable var _n_cpar: nullable TCpar = null
714 readable var _n_type: nullable AType = null
715 readable var _n_closure_decls: List[AClosureDecl] = new List[AClosureDecl]
716 end
717 class AParam
718 super Prod
719 readable var _n_id: TId
720 readable var _n_type: nullable AType = null
721 readable var _n_dotdotdot: nullable TDotdotdot = null
722 end
723 class AClosureDecl
724 super Prod
725 readable var _n_kwbreak: nullable TKwbreak = null
726 readable var _n_bang: TBang
727 readable var _n_id: TId
728 readable var _n_signature: ASignature
729 readable var _n_expr: nullable AExpr = null
730 end
731 class AType
732 super Prod
733 readable var _n_kwnullable: nullable TKwnullable = null
734 readable var _n_id: TClassid
735 readable var _n_types: List[AType] = new List[AType]
736 end
737 class ALabel
738 super Prod
739 readable var _n_kwlabel: TKwlabel
740 readable var _n_id: TId
741 end
742 abstract class AExpr super Prod end
743 class ABlockExpr
744 super AExpr
745 readable var _n_expr: List[AExpr] = new List[AExpr]
746 readable var _n_kwend: nullable TKwend = null
747 end
748 class AVardeclExpr
749 super AExpr
750 readable var _n_kwvar: TKwvar
751 readable var _n_id: TId
752 readable var _n_type: nullable AType = null
753 readable var _n_assign: nullable TAssign = null
754 readable var _n_expr: nullable AExpr = null
755 end
756 class AReturnExpr
757 super AExpr
758 readable var _n_kwreturn: nullable TKwreturn = null
759 readable var _n_expr: nullable AExpr = null
760 end
761 abstract class ALabelable
762 super Prod
763 readable var _n_label: nullable ALabel = null
764 end
765 class ABreakExpr
766 super AExpr
767 super ALabelable
768 readable var _n_kwbreak: TKwbreak
769 readable var _n_expr: nullable AExpr = null
770 end
771 class AAbortExpr
772 super AExpr
773 readable var _n_kwabort: TKwabort
774 end
775 class AContinueExpr
776 super AExpr
777 super ALabelable
778 readable var _n_kwcontinue: nullable TKwcontinue = null
779 readable var _n_expr: nullable AExpr = null
780 end
781 class ADoExpr
782 super AExpr
783 super ALabelable
784 readable var _n_kwdo: TKwdo
785 readable var _n_block: nullable AExpr = null
786 end
787 class AIfExpr
788 super AExpr
789 readable var _n_kwif: TKwif
790 readable var _n_expr: AExpr
791 readable var _n_then: nullable AExpr = null
792 readable var _n_else: nullable AExpr = null
793 end
794 class AIfexprExpr
795 super AExpr
796 readable var _n_kwif: TKwif
797 readable var _n_expr: AExpr
798 readable var _n_kwthen: TKwthen
799 readable var _n_then: AExpr
800 readable var _n_kwelse: TKwelse
801 readable var _n_else: AExpr
802 end
803 class AWhileExpr
804 super AExpr
805 super ALabelable
806 readable var _n_kwwhile: TKwwhile
807 readable var _n_expr: AExpr
808 readable var _n_kwdo: TKwdo
809 readable var _n_block: nullable AExpr = null
810 end
811 class ALoopExpr
812 super AExpr
813 super ALabelable
814 readable var _n_kwloop: TKwloop
815 readable var _n_block: nullable AExpr = null
816 end
817 class AForExpr
818 super AExpr
819 super ALabelable
820 readable var _n_kwfor: TKwfor
821 readable var _n_ids: List[TId] = new List[TId]
822 readable var _n_expr: AExpr
823 readable var _n_kwdo: TKwdo
824 readable var _n_block: nullable AExpr = null
825 end
826 class AAssertExpr
827 super AExpr
828 readable var _n_kwassert: TKwassert
829 readable var _n_id: nullable TId = null
830 readable var _n_expr: AExpr
831 readable var _n_else: nullable AExpr = null
832 end
833 abstract class AAssignFormExpr
834 super AExpr
835 readable var _n_assign: TAssign
836 readable var _n_value: AExpr
837 end
838 abstract class AReassignFormExpr
839 super AExpr
840 readable var _n_assign_op: AAssignOp
841 readable var _n_value: AExpr
842 end
843 class AOnceExpr
844 super AProxyExpr
845 readable var _n_kwonce: TKwonce
846 end
847 abstract class ASendExpr
848 super AExpr
849 readable var _n_expr: AExpr
850 readable var _n_closure_defs: List[AClosureDef] = new List[AClosureDef]
851 end
852 abstract class ABinopExpr
853 super ASendExpr
854 readable var _n_expr2: AExpr
855 end
856 abstract class ABoolExpr
857 super AExpr
858 end
859 class AOrExpr
860 super ABoolExpr
861 readable var _n_expr: AExpr
862 readable var _n_expr2: AExpr
863 end
864 class AAndExpr
865 super ABoolExpr
866 readable var _n_expr: AExpr
867 readable var _n_expr2: AExpr
868 end
869 class AOrElseExpr
870 super ABoolExpr
871 readable var _n_expr: AExpr
872 readable var _n_expr2: AExpr
873 end
874 class ANotExpr
875 super ABoolExpr
876 readable var _n_kwnot: TKwnot
877 readable var _n_expr: AExpr
878 end
879 class AEqExpr
880 super ABinopExpr
881 end
882 class AEeExpr
883 super ABoolExpr
884 readable var _n_expr: AExpr
885 readable var _n_expr2: AExpr
886 end
887 class ANeExpr
888 super ABinopExpr
889 end
890 class ALtExpr
891 super ABinopExpr
892 end
893 class ALeExpr
894 super ABinopExpr
895 end
896 class ALlExpr
897 super ABinopExpr
898 end
899 class AGtExpr
900 super ABinopExpr
901 end
902 class AGeExpr
903 super ABinopExpr
904 end
905 class AGgExpr
906 super ABinopExpr
907 end
908 class AIsaExpr
909 super ABoolExpr
910 readable var _n_expr: AExpr
911 readable var _n_type: AType
912 end
913 class APlusExpr
914 super ABinopExpr
915 end
916 class AMinusExpr
917 super ABinopExpr
918 end
919 class AStarshipExpr
920 super ABinopExpr
921 end
922 class AStarExpr
923 super ABinopExpr
924 end
925 class ASlashExpr
926 super ABinopExpr
927 end
928 class APercentExpr
929 super ABinopExpr
930 end
931 class AUminusExpr
932 super ASendExpr
933 readable var _n_minus: TMinus
934 end
935 class ANewExpr
936 super AExpr
937 readable var _n_kwnew: TKwnew
938 readable var _n_type: AType
939 readable var _n_id: nullable TId = null
940 readable var _n_args: AExprs
941 end
942 abstract class AAttrFormExpr
943 super AExpr
944 readable var _n_expr: AExpr
945 readable var _n_id: TAttrid
946 end
947 class AAttrExpr
948 super AAttrFormExpr
949 end
950 class AAttrAssignExpr
951 super AAttrFormExpr
952 super AAssignFormExpr
953 end
954 abstract class ACallFormExpr
955 super ASendExpr
956 readable var _n_id: TId
957 readable var _n_args: AExprs
958 end
959 abstract class ASendReassignFormExpr
960 super ASendExpr
961 super AReassignFormExpr
962 end
963 class AAttrReassignExpr
964 super AExpr
965 super AAttrFormExpr
966 super AReassignFormExpr
967 end
968 class ACallExpr
969 super ACallFormExpr
970 end
971 class ACallAssignExpr
972 super ACallFormExpr
973 super AAssignFormExpr
974 end
975 class ACallReassignExpr
976 super AExpr
977 super ACallFormExpr
978 super ASendReassignFormExpr
979 end
980 class ASuperExpr
981 super AExpr
982 readable var _n_qualified: nullable AQualified = null
983 readable var _n_kwsuper: TKwsuper
984 readable var _n_args: AExprs
985 end
986 class AInitExpr
987 super ASendExpr
988 readable var _n_kwinit: TKwinit
989 readable var _n_args: AExprs
990 end
991 abstract class ABraFormExpr
992 super ASendExpr
993 readable var _n_args: AExprs
994 end
995 class ABraExpr
996 super ABraFormExpr
997 end
998 class ABraAssignExpr
999 super ABraFormExpr
1000 super AAssignFormExpr
1001 end
1002 abstract class AVarFormExpr
1003 super AExpr
1004 readable var _n_id: TId
1005 end
1006 class ABraReassignExpr
1007 super ABraFormExpr
1008 super ASendReassignFormExpr
1009 end
1010 class AClosureCallExpr
1011 super AExpr
1012 readable var _n_id: TId
1013 readable var _n_args: AExprs
1014 readable var _n_closure_defs: List[AClosureDef] = new List[AClosureDef]
1015 end
1016 class AVarExpr
1017 super AVarFormExpr
1018 end
1019 class AVarAssignExpr
1020 super AVarFormExpr
1021 super AAssignFormExpr
1022 end
1023 class AVarReassignExpr
1024 super AVarFormExpr
1025 super AReassignFormExpr
1026 end
1027 abstract class ARangeExpr
1028 super AExpr
1029 readable var _n_expr: AExpr
1030 readable var _n_expr2: AExpr
1031 end
1032 class ACrangeExpr
1033 super ARangeExpr
1034 readable var _n_obra: TObra
1035 readable var _n_cbra: TCbra
1036 end
1037 class AOrangeExpr
1038 super ARangeExpr
1039 readable var _n_obra: TObra
1040 readable var _n_cbra: TObra
1041 end
1042 class AArrayExpr
1043 super AExpr
1044 readable var _n_exprs: AExprs
1045 end
1046 class ASelfExpr
1047 super AExpr
1048 readable var _n_kwself: nullable TKwself
1049 end
1050 class AImplicitSelfExpr
1051 super ASelfExpr
1052 end
1053 class ATrueExpr
1054 super ABoolExpr
1055 readable var _n_kwtrue: TKwtrue
1056 end
1057 class AFalseExpr
1058 super ABoolExpr
1059 readable var _n_kwfalse: TKwfalse
1060 end
1061 class ANullExpr
1062 super AExpr
1063 readable var _n_kwnull: TKwnull
1064 end
1065 class AIntExpr
1066 super AExpr
1067 readable var _n_number: TNumber
1068 end
1069 class AFloatExpr
1070 super AExpr
1071 readable var _n_float: TFloat
1072 end
1073 class ACharExpr
1074 super AExpr
1075 readable var _n_char: TChar
1076 end
1077 abstract class AStringFormExpr
1078 super AExpr
1079 end
1080 class AStringExpr
1081 super AStringFormExpr
1082 readable var _n_string: TString
1083 end
1084 class AStartStringExpr
1085 super AStringFormExpr
1086 readable var _n_string: TStartString
1087 end
1088 class AMidStringExpr
1089 super AStringFormExpr
1090 readable var _n_string: TMidString
1091 end
1092 class AEndStringExpr
1093 super AStringFormExpr
1094 readable var _n_string: TEndString
1095 end
1096 class ASuperstringExpr
1097 super AExpr
1098 readable var _n_exprs: List[AExpr] = new List[AExpr]
1099 end
1100 class AParExpr
1101 super AProxyExpr
1102 readable var _n_opar: TOpar
1103 readable var _n_cpar: TCpar
1104 end
1105 abstract class AProxyExpr
1106 super AExpr
1107 readable var _n_expr: AExpr
1108 end
1109 class AAsCastExpr
1110 super AExpr
1111 readable var _n_expr: AExpr
1112 readable var _n_kwas: TKwas
1113 readable var _n_opar: TOpar
1114 readable var _n_type: AType
1115 readable var _n_cpar: TCpar
1116 end
1117 class AAsNotnullExpr
1118 super AExpr
1119 readable var _n_expr: AExpr
1120 readable var _n_kwas: TKwas
1121 readable var _n_opar: TOpar
1122 readable var _n_kwnot: TKwnot
1123 readable var _n_kwnull: TKwnull
1124 readable var _n_cpar: TCpar
1125 end
1126 class AIssetAttrExpr
1127 super AAttrFormExpr
1128 readable var _n_kwisset: TKwisset
1129 end
1130 abstract class AExprs
1131 super Prod
1132 readable var _n_exprs: List[AExpr] = new List[AExpr]
1133 end
1134 class ADebugTypeExpr
1135 super AExpr
1136 readable var _n_kwdebug: TKwdebug
1137 readable var _n_kwtype: TKwtype
1138 readable var _n_expr: AExpr
1139 readable var _n_type: AType
1140 end
1141 class AListExprs
1142 super AExprs
1143 end
1144 class AParExprs
1145 super AExprs
1146 readable var _n_opar: TOpar
1147 readable var _n_cpar: TCpar
1148 end
1149 class ABraExprs
1150 super AExprs
1151 readable var _n_obra: TObra
1152 readable var _n_cbra: TCbra
1153 end
1154 abstract class AAssignOp super Prod end
1155 class APlusAssignOp
1156 super AAssignOp
1157 readable var _n_pluseq: TPluseq
1158 end
1159 class AMinusAssignOp
1160 super AAssignOp
1161 readable var _n_minuseq: TMinuseq
1162 end
1163 class AClosureDef
1164 super ALabelable
1165 readable var _n_bang: TBang
1166 readable var _n_id: AClosureId
1167 readable var _n_ids: List[TId] = new List[TId]
1168 readable var _n_kwdo: nullable TKwdo = null
1169 readable var _n_expr: nullable AExpr = null
1170 redef fun hot_location do return n_id.location
1171 end
1172 abstract class AClosureId
1173 super Prod
1174 end
1175 class ASimpleClosureId
1176 super AClosureId
1177 readable var _n_id: TId
1178 end
1179 class ABreakClosureId
1180 super AClosureId
1181 readable var _n_kwbreak: TKwbreak
1182 end
1183 class AModuleName
1184 super Prod
1185 readable var _n_quad: nullable TQuad = null
1186 readable var _n_path: List[TId] = new List[TId]
1187 readable var _n_id: TId
1188 end
1189 class AInLanguage
1190 super Prod
1191 readable var _n_kwin: TKwin
1192 readable var _n_string: TString
1193 end
1194 class AExternCodeBlock
1195 super Prod
1196 readable var _n_in_language: nullable AInLanguage = null
1197 readable var _n_extern_code_segment: TExternCodeSegment
1198 end
1199 class AQualified
1200 super Prod
1201 readable var _n_quad: nullable TQuad = null
1202 readable var _n_id: List[TId] = new List[TId]
1203 readable var _n_classid: nullable TClassid = null
1204 end
1205 class ADoc
1206 super Prod
1207 readable var _n_comment: List[TComment] = new List[TComment]
1208 end
1209
1210 class Start
1211 super Prod
1212 readable var _n_base: nullable AModule
1213 readable var _n_eof: EOF
1214 init(n_base: nullable AModule, n_eof: EOF)
1215 do
1216 self._n_base = n_base
1217 self._n_eof = n_eof
1218 end
1219 end