in parser_nodes, ANode has an empty constructor inherited by all subclasses
Signed-off-by: Jean Privat <jean@pryen.org>
fun location: Location do return _location.as(not null)
# The location of the important part of the node (identifier or whatever)
fun hot_location: Location do return location
+ init do end
end
# Ancestor of all tokens
class AConcreteInitPropdef
super AConcreteMethPropdef
super AInitPropdef
- init do end
readable var _n_kwinit: TKwinit
redef fun hot_location do return n_kwinit.location
end
class AExternInitPropdef
super AExternPropdef
super AInitPropdef
- init do end
readable var _n_kwnew: TKwnew
end
class AMainMethPropdef
super Prod
readable var _n_base: nullable AModule
readable var _n_eof: EOF
+ init(n_base: nullable AModule, n_eof: EOF)
+ do
+ self._n_base = n_base
+ self._n_eof = n_eof
+ end
end
end
redef class Start
- init(
- n_base: nullable AModule,
- n_eof: EOF)
- do
- _n_base = n_base
- _n_eof = n_eof
- end
-
redef fun replace_child(old_child: ANode, new_child: nullable ANode)
do
if _n_base == old_child then
super Prod
readable var _n_base: nullable $baseprod
readable var _n_eof: EOF
+ init(
+ n_base: nullable $baseprod,
+ n_eof: EOF)
+ do
+ _n_base = n_base
+ _n_eof = n_eof
+ end
+
end
$ end template
$ end foreach
redef class Start
- init(
- n_base: nullable $baseprod,
- n_eof: EOF)
- do
- _n_base = n_base
- _n_eof = n_eof
- end
-
redef fun replace_child(old_child: PNode, new_child: nullable PNode)
do
if _n_base == old_child then