We called return_from_matcher once inside matcher_evaluate_capturing_instruction and outside of it. That way we returned not to the parent call stack entry but to the grandparent.
18 lines
150 B
Text
18 lines
150 B
Text
===== script =====
|
|
foo = {
|
|
x y z -> 3
|
|
x y -> 2
|
|
x -> 1
|
|
-> 0
|
|
}
|
|
|
|
print (foo 1 1 1)
|
|
print (foo 1 1)
|
|
print (foo 1)
|
|
print (foo)
|
|
|
|
===== output =====
|
|
3
|
|
2
|
|
1
|
|
0
|