mirror of
https://github.com/janet-lang/janet
synced 2024-11-24 17:27:18 +00:00
Fixes #412 Lookahead does not move cursor.
This commit is contained in:
parent
930ac9c57d
commit
677737d345
@ -150,6 +150,7 @@ tail:
|
||||
down1(s);
|
||||
const uint8_t *result = peg_rule(s, s->bytecode + rule[2], text);
|
||||
up1(s);
|
||||
text -= ((int32_t *)rule)[1];
|
||||
return result ? text : NULL;
|
||||
}
|
||||
|
||||
|
@ -285,4 +285,7 @@ neldb\0\0\0\xD8\x05printG\x01\0\xDE\xDE\xDE'\x03\0marshal_tes/\x02
|
||||
(assert (= nil (while (and false false) (fn []) (error "should not happen"))) "strangeloop 1")
|
||||
(assert (= nil (while (not= nil nil) (fn []) (error "should not happen"))) "strangeloop 2")
|
||||
|
||||
# Issue #412
|
||||
(assert (peg/match '(* "a" (> -1 "a") "b") "abc") "lookhead does not move cursor")
|
||||
|
||||
(end-suite)
|
||||
|
Loading…
Reference in New Issue
Block a user