]> gitweb.factorcode.org Git - factor.git/commitdiff
peg: use memoize-quot instead of private words
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 1 Jun 2023 17:48:33 +0000 (10:48 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 1 Jun 2023 17:48:33 +0000 (10:48 -0700)
basis/peg/peg.factor

index 5d570678f630b14028981796095594602bc8ecdf..4a095ed31bf30963f097602e0d077c846066180c 100644 (file)
@@ -3,8 +3,8 @@
 
 USING: accessors arrays assocs classes combinators
 combinators.short-circuit compiler.units effects.parser kernel
-make math math.order memoize.private namespaces quotations
-sequences sets splitting unicode vectors vocabs.loader words ;
+make math math.order memoize namespaces quotations sequences
+sets splitting unicode vectors vocabs.loader words ;
 
 IN: peg
 
@@ -595,7 +595,7 @@ ERROR: parse-failed input word ;
 
 SYNTAX: PEG:
     (:) [
-        f f 2array swap ( -- parser ) make/0
+        ( -- parser ) memoize-quot
         '[ @ (parse) check-parse-result ast>> ]
     ] dip define-declared ;