Fix just parser in pegs
parent
a0e1659a3e
commit
9b7246555a
|
@ -48,3 +48,7 @@ IN: peg.parsers.tests
|
||||||
|
|
||||||
[ V{ } ]
|
[ V{ } ]
|
||||||
[ "" epsilon parse parse-result-ast ] unit-test
|
[ "" epsilon parse parse-result-ast ] unit-test
|
||||||
|
|
||||||
|
{ "a" } [
|
||||||
|
"a" "a" token just parse parse-result-ast
|
||||||
|
] unit-test
|
|
@ -3,14 +3,14 @@
|
||||||
USING: kernel sequences strings namespaces math assocs shuffle
|
USING: kernel sequences strings namespaces math assocs shuffle
|
||||||
vectors arrays combinators.lib math.parser match
|
vectors arrays combinators.lib math.parser match
|
||||||
unicode.categories sequences.deep peg peg.private
|
unicode.categories sequences.deep peg peg.private
|
||||||
peg.search math.ranges ;
|
peg.search math.ranges words ;
|
||||||
IN: peg.parsers
|
IN: peg.parsers
|
||||||
|
|
||||||
TUPLE: just-parser p1 ;
|
TUPLE: just-parser p1 ;
|
||||||
|
|
||||||
: just-pattern
|
: just-pattern
|
||||||
[
|
[
|
||||||
dup [
|
execute dup [
|
||||||
dup parse-result-remaining empty? [ drop f ] unless
|
dup parse-result-remaining empty? [ drop f ] unless
|
||||||
] when
|
] when
|
||||||
] ;
|
] ;
|
||||||
|
|
Loading…
Reference in New Issue