Blocs will use the reserved 'with' keyword.
end
# Create an array with some `items'.
- init with(objects: E...)
+ init with_items(objects: E...)
do
_items = objects._items
_capacity = objects._capacity
attr _reduce_table: Array[ReduceAction]
private meth build_reduce_table
do
- _reduce_table = new Array[ReduceAction].with(
+ _reduce_table = new Array[ReduceAction].with_items(
new ReduceAction0,
new ReduceAction1,
new ReduceAction2,
attr _reduce_table: Array[ReduceAction]
private meth build_reduce_table
do
- _reduce_table = new Array[ReduceAction].with(
+ _reduce_table = new Array[ReduceAction].with_items(
$ foreach {rules/rule}
new ReduceAction@index[-sep ','-]
$ end foreach
meth sub: ControlFlowContext
do
- return new ControlFlowContext.with(self)
+ return new ControlFlowContext.with_prev(self)
end
init
do
end
- init with(p: ControlFlowContext)
+ init with_prev(p: ControlFlowContext)
do
_prev = p
_has_return = p.has_return
n_type.check_visibility(v, _readmethod)
end
if n_writable != null then
- _writemethod.signature = new MMSignature(new Array[MMType].with(t), null, v.local_class.get_type)
+ _writemethod.signature = new MMSignature(new Array[MMType].with_items(t), null, v.local_class.get_type)
process_and_check(v, _writemethod, n_writable.n_kwredef != null, visibility_level)
n_type.check_visibility(v, _writemethod)
end
# Build a new VariableContext
meth sub: SubVariableContext
do
- return new SubVariableContext.with(self, null, null)
+ return new SubVariableContext.with_prev(self, null, null)
end
# Build a nested VariableContext with new variable information
meth sub_with(v: Variable, t: MMType): SubVariableContext
do
- return new SubVariableContext.with(self, v, t)
+ return new SubVariableContext.with_prev(self, v, t)
end
init
return prev.stype(v)
end
- init with(p: VariableContext, v: Variable, t: MMType)
+ init with_prev(p: VariableContext, v: Variable, t: MMType)
do
init
_prev = p