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:
|
dest:
|
||||||
@ mkdir -p bin
|
@ mkdir -p bin
|
||||||
run: all bin/modal
|
run: all bin/modal
|
||||||
@ bin/modal examples/hello.modal
|
@ bin/modal -q examples/hello.modal
|
||||||
debug: all bin/modal-debug
|
debug: all bin/modal-debug
|
||||||
@ bin/modal-debug examples/hello.modal
|
@ bin/modal-debug examples/hello.modal
|
||||||
test: all bin/modal-debug bin/modal
|
test: all bin/modal-debug bin/modal
|
||||||
|
|
|
@ -216,7 +216,8 @@ rewrite(void)
|
||||||
if(c == '?' && s[1] == '(') {
|
if(c == '?' && s[1] == '(') {
|
||||||
cap = walk(s + 1), compile_rule(&lambda, -1, s + 2), s = cap;
|
cap = walk(s + 1), compile_rule(&lambda, -1, s + 2), s = cap;
|
||||||
while(*s == ' ') s++;
|
while(*s == ' ') s++;
|
||||||
return apply_rule(&lambda, s);
|
if(!apply_rule(&lambda, s)) write_rule(r, s, 0);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
/* phase: match */
|
/* phase: match */
|
||||||
for(r = rules; r < rules_; r++)
|
for(r = rules; r < rules_; r++)
|
||||||
|
|
Loading…
Reference in New Issue