]> gitweb.factorcode.org Git - factor.git/commitdiff
add ${ to literals
authorDoug Coleman <erg@jobim.local>
Sun, 3 May 2009 20:30:37 +0000 (15:30 -0500)
committerDoug Coleman <erg@jobim.local>
Sun, 3 May 2009 20:30:37 +0000 (15:30 -0500)
basis/literals/literals-tests.factor
basis/literals/literals.factor

index 024c94e4f2dee7119c1fbe26882b9467020c0ba6..29072f129984248932e5cc554ce596c369ed303a 100644 (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
index e55d78ab6ef183781192d04f69da15f90b4ded77..7c7592dda88b612648a4eeb76303bace58d624d9 100644 (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 ;