]> gitweb.factorcode.org Git - factor.git/commitdiff
peg.ebnf: simplify M\ ebnf-non-terminal (transform) with fry.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 20 Nov 2020 00:54:41 +0000 (16:54 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 20 Nov 2020 00:54:41 +0000 (16:54 -0800)
basis/peg/ebnf/ebnf.factor

index 2e1cd7e64c650e64ff80054912dde79dd05ebac0..f05b1ab3c0689f630e79072b4bb7ed64ddf43fb9 100644 (file)
@@ -512,10 +512,8 @@ M: ebnf-foreign (transform)
 ERROR: parser-not-found name ;
 
 M: ebnf-non-terminal (transform)
-    symbol>> [
-        , \ dup , parser get , \ at ,
-        [ parser-not-found ] , \ unless* , \ nip ,
-    ] [ ] make box ;
+    symbol>> parser get
+    '[ _ dup _ at [ parser-not-found ] unless* nip ] box ;
 
 : transform-ebnf ( string -- object )
     ebnf-parser parse transform ;