nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
parser: regenerate with comprehension arrays
[nit.git]
/
src
/
parser
/
parser_prod.nit
diff --git
a/src/parser/parser_prod.nit
b/src/parser/parser_prod.nit
index
9964ed8
..
39fafc6
100644
(file)
--- a/
src/parser/parser_prod.nit
+++ b/
src/parser/parser_prod.nit
@@
-5053,7
+5053,7
@@
end
redef class AArrayExpr
init init_aarrayexpr (
n_obra: nullable TObra,
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
n_type: nullable AType,
n_cbra: nullable TCbra,
n_annotations: nullable AAnnotations
@@
-5061,8
+5061,7
@@
redef class AArrayExpr
do
_n_obra = n_obra.as(not null)
n_obra.parent = self
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_type = n_type
if n_type != null then n_type.parent = self
_n_cbra = n_cbra.as(not null)
@@
-5077,10
+5076,7
@@
redef class AArrayExpr
n_obra = new_child.as(TObra)
return
end
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
if _n_type == old_child then
n_type = new_child.as(nullable AType)
return
@@
-5100,11
+5096,6
@@
redef class AArrayExpr
_n_obra = node
node.parent = self
end
_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 n_type=(node)
do
_n_type = node
@@
-5125,7
+5116,7
@@
redef class AArrayExpr
redef fun visit_all(v: Visitor)
do
v.enter_visit(_n_obra)
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)
v.enter_visit(_n_type)
v.enter_visit(_n_cbra)
v.enter_visit(_n_annotations)