# Production AST nodes full definition.
# This file was generated by SableCC (http://www.sablecc.org/).
-module parser_prod
+module parser_prod is no_warning("missing-doc")
import lexer
intrude import parser_nodes
redef class AArrayExpr
init init_aarrayexpr (
n_obra: nullable TObra,
- n_exprs: nullable AExprs,
+ n_exprs: Collection[Object], # Should be Collection[AExpr]
n_type: nullable AType,
n_cbra: nullable TCbra,
n_annotations: nullable AAnnotations
do
_n_obra = n_obra.as(not null)
n_obra.parent = self
- _n_exprs = n_exprs.as(not null)
- n_exprs.parent = self
+ self.n_exprs.unsafe_add_all(n_exprs)
_n_type = n_type
if n_type != null then n_type.parent = self
_n_cbra = n_cbra.as(not null)
n_obra = new_child.as(TObra)
return
end
- if _n_exprs == old_child then
- n_exprs = new_child.as(AExprs)
- return
- end
+ if n_exprs.replace_child(old_child, new_child) then return
if _n_type == old_child then
n_type = new_child.as(nullable AType)
return
_n_obra = node
node.parent = self
end
- redef fun n_exprs=(node)
- do
- _n_exprs = node
- node.parent = self
- end
redef fun n_type=(node)
do
_n_type = node
redef fun visit_all(v: Visitor)
do
v.enter_visit(_n_obra)
- v.enter_visit(_n_exprs)
+ n_exprs.visit_all(v)
v.enter_visit(_n_type)
v.enter_visit(_n_cbra)
v.enter_visit(_n_annotations)