]> gitweb.factorcode.org Git - factor.git/blob - 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
1 ! Copyright (C) 2010 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: combinators combinators.smart fry lexer quotations
4 sequences slots  ;
5 IN: slots.syntax
6
7 SYNTAX: slots[
8     "]" [ reader-word 1quotation ] map-tokens
9     '[ _ cleave ] append! ;
10
11 SYNTAX: slots{
12     "}" [ reader-word 1quotation ] map-tokens
13     '[ [ _ cleave ] output>array ] append! ;