Fixed issue with invalid lambda
This commit is contained in:
parent
2f9f9d7f15
commit
927479bc44
2
makefile
2
makefile
|
@ -8,7 +8,7 @@ all: dest
|
|||
dest:
|
||||
@ mkdir -p bin
|
||||
run: all bin/modal
|
||||
@ bin/modal examples/hello.modal
|
||||
@ bin/modal -q examples/hello.modal
|
||||
debug: all bin/modal-debug
|
||||
@ bin/modal-debug examples/hello.modal
|
||||
test: all bin/modal-debug bin/modal
|
||||
|
|
|
@ -216,7 +216,8 @@ rewrite(void)
|
|||
if(c == '?' && s[1] == '(') {
|
||||
cap = walk(s + 1), compile_rule(&lambda, -1, s + 2), s = cap;
|
||||
while(*s == ' ') s++;
|
||||
return apply_rule(&lambda, s);
|
||||
if(!apply_rule(&lambda, s)) write_rule(r, s, 0);
|
||||
return 1;
|
||||
}
|
||||
/* phase: match */
|
||||
for(r = rules; r < rules_; r++)
|
||||
|
|
Loading…
Reference in New Issue