if alt.name.has_suffix("+_more") then
add "\t\tvar prod = n0"
- add "\t\tn0.items.add(n1)"
+ add "\t\tn0.children.add(n1)"
else if alt.name.has_suffix("+_one") then
add "\t\tvar prod = new {alt.prod.acname}"
- add "\t\tprod.items.add(n0)"
+ add "\t\tprod.children.add(n0)"
else
alt.make_codes
var cpt = 0
error.text = token.text
error.token = token
end
- error.error_tree.items.add_all(node_stack)
+ error.error_tree.children.add_all(node_stack)
error.expected = state.error_msg
node_stack.clear
node_stack.add error
# The name of the node (as used in the grammar file)
fun node_name: String do return class_name
- # A point of view on the direct childrens of the node
+ # A point of view on the direct children of the node
fun children: SequenceRead[nullable Node] is abstract
# Visit all the children of the node with the visitor `v`
# A hogeneous sequence of node, used to represent unbounded lists (and + modifier)
class Nodes[T: Node]
super Node
- redef fun children do return items
- var items = new Array[T]
+ redef var children = new Array[T]
end
-# A production with a specific, named and statically typed childrens
+# A production with a specific, named and statically typed children
class NProd
super Node
redef var children: SequenceRead[nullable Node] = new NProdChildren(self)