add ${ to literals

db4
Doug Coleman 2009-05-03 15:30:37 -05:00
parent c8dd655934
commit 3e640e9cd6
2 changed files with 9 additions and 1 deletions

View File

@ -19,3 +19,9 @@ IN: literals.tests
[ { 0.5 2.0 } ] [ { $[ 1.0 2.0 / ] 2.0 } ] unit-test
[ { 1.0 { 0.5 1.5 } 4.0 } ] [ { 1.0 { $[ 1.0 2.0 / ] 1.5 } $[ 2.0 2.0 * ] } ] unit-test
<<
CONSTANT: constant-a 3
>>
[ { 3 10 "ftw" } ] [ ${ constant-a 10 "ftw" } ] unit-test

View File

@ -1,6 +1,8 @@
! (c) Joe Groff, see license for details
USING: accessors continuations kernel parser words quotations vectors ;
USING: accessors continuations kernel parser words quotations
combinators.smart vectors sequences ;
IN: literals
SYNTAX: $ scan-word [ def>> call ] curry with-datastack >vector ;
SYNTAX: $[ parse-quotation with-datastack >vector ;
SYNTAX: ${ \ } [ [ ?execute ] { } map-as ] parse-literal ;