while j < n - m + 1 do
var i = m - 1 # Cursor in the pattern
while i >= 0 and _motif[i] == s[i + j] do i -= 1
- if (i < 0) then
+ if i < 0 then
return j
else
var gs = _gs[i] # Good shift
# Replace itself with an other node in the AST
fun replace_with(node: ANode)
do
- if (_parent != null) then
+ if _parent != null then
_parent.replace_child(self, node)
end
end
# Replace itself with an other node in the AST
fun replace_with(node: PNode)
do
- if (_parent != null) then
+ if _parent != null then
_parent.replace_child(self, node)
end
end
var sig = method.signature
assert params.length == sig.arity + 1
var rtype = sig.recv # sig.return_type
- if rtype != null then
- v.add_assignment(new IRegister(rtype), v.expr(new INative(method, params), rtype))
- end
+ v.add_assignment(new IRegister(rtype), v.expr(new INative(method, params), rtype))
super
end
var local_class: MMSrcLocalClass
var mod = v.mmmodule
var local_classes = mod.src_local_classes
- if (local_classes.has_key(name)) then
+ if local_classes.has_key(name) then
local_class = local_classes[name]
_local_class = local_class
if self isa AStdClassdef then