From: John Benediktsson Date: Wed, 30 Aug 2023 23:18:40 +0000 (-0700) Subject: interpolate: adding interpolated string syntax I"hello, ${0}" X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=c0bd6508c277859b05537f2f03cb72a93b48b36c interpolate: adding interpolated string syntax I"hello, ${0}" --- diff --git a/basis/interpolate/interpolate-tests.factor b/basis/interpolate/interpolate-tests.factor index 0d4a8d16d6..771bd76cdb 100644 --- a/basis/interpolate/interpolate-tests.factor +++ b/basis/interpolate/interpolate-tests.factor @@ -42,3 +42,5 @@ USING: interpolate io.streams.string namespaces tools.test locals ; "accidentally" [ [I Oops, I ${0} the whole ${noun}...I] ] with-string-writer ] ] unit-test + +{ "hello, world" } [ "world" I"hello, ${0}" ] unit-test diff --git a/basis/interpolate/interpolate.factor b/basis/interpolate/interpolate.factor index 59024ff90d..9d7115ef86 100644 --- a/basis/interpolate/interpolate.factor +++ b/basis/interpolate/interpolate.factor @@ -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 string ] append! ;