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