1 ! (c) Joe Groff, see license for details
2 USING: accessors continuations kernel parser words quotations
3 combinators.smart vectors sequences fry ;
8 ! Use def>> call so that CONSTANT:s defined in the same file can
11 : expand-literal ( seq obj -- seq' )
12 '[ _ dup word? [ def>> call ] when ] with-datastack ;
14 : expand-literals ( seq -- seq' )
15 [ [ { } ] dip expand-literal ] map concat ;
19 SYNTAX: $ scan-word expand-literal >vector ;
20 SYNTAX: $[ parse-quotation with-datastack >vector ;
21 SYNTAX: ${ \ } [ expand-literals ] parse-literal ;