]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/slots/syntax/syntax.factor
Add a parsing word to output slots to the stack instead of to an array
[factor.git] / extra / slots / syntax / syntax.factor
index 95207a0de94fb713594c1a751e0c58cc2aa527e7..7bfe238fa83515dbbc0a1ef263dfa48088abad82 100755 (executable)
@@ -4,6 +4,10 @@ USING: combinators combinators.smart fry lexer quotations
 sequences slots  ;
 IN: slots.syntax
 
+SYNTAX: slots[
+    "]" [ reader-word 1quotation ] map-tokens
+    '[ _ cleave ] append! ;
+
 SYNTAX: slots{
     "}" [ reader-word 1quotation ] map-tokens
     '[ [ _ cleave ] output>array ] append! ;