Fix just parser in pegs

db4
Chris Double 2008-03-26 15:26:54 +13:00
parent a0e1659a3e
commit 9b7246555a
2 changed files with 6 additions and 2 deletions

View File

@ -48,3 +48,7 @@ IN: peg.parsers.tests
[ V{ } ]
[ "" epsilon parse parse-result-ast ] unit-test
{ "a" } [
"a" "a" token just parse parse-result-ast
] unit-test

View File

@ -3,14 +3,14 @@
USING: kernel sequences strings namespaces math assocs shuffle
vectors arrays combinators.lib math.parser match
unicode.categories sequences.deep peg peg.private
peg.search math.ranges ;
peg.search math.ranges words ;
IN: peg.parsers
TUPLE: just-parser p1 ;
: just-pattern
[
dup [
execute dup [
dup parse-result-remaining empty? [ drop f ] unless
] when
] ;