]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/interpolate/interpolate.factor
interpolate: adding interpolated string syntax I"hello, ${0}"
[factor.git] / basis / interpolate / interpolate.factor
index 59024ff90d35cf4b54956c1bae0860e1631212d3..9d7115ef866997f58a777ba3f4a3f001e2b3113a 100644 (file)
@@ -2,7 +2,7 @@
 ! See https://factorcode.org/license.txt for BSD license.
 USING: accessors fry generalizations io io.streams.string kernel
 make math math.order math.parser multiline namespaces present
-sequences splitting strings vocabs.parser ;
+sequences splitting strings strings.parser vocabs.parser ;
 IN: interpolate
 
 <PRIVATE
@@ -89,3 +89,5 @@ MACRO: interpolate-locals ( str -- quot )
 SYNTAX: [I
     "I]" parse-multiline-string
     interpolate-locals-quot append! ;
+
+SYNTAX: I" parse-string '[ _ interpolate>string ] append! ;