interpolate: [I to I[[ ]]

locals-and-roots
Doug Coleman 2016-06-09 14:57:04 -07:00
parent 0f9b3926ef
commit 0e71afabe0
3 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@ in: alien.remote-control.tests
image-path :> image image-path :> image
[ [
[I I[[
#include <vm/master.h> #include <vm/master.h>
#include <stdio.h> #include <stdio.h>
#include <stdbool.h> #include <stdbool.h>
@ -32,7 +32,7 @@ int main(int argc, char **argv)
printf("Done.\n"); printf("Done.\n");
return 0; return 0;
} }
I] ]]
] with-string-writer ] with-string-writer
[ compile-file ] with-temp-directory [ compile-file ] with-temp-directory
[ run-test ] with-temp-directory ; [ run-test ] with-temp-directory ;

View File

@ -40,6 +40,6 @@ in: interpolate.tests
{ "Oops, I accidentally the whole economy..." } [ { "Oops, I accidentally the whole economy..." } [
let[ let[
"economy" :> noun "economy" :> noun
"accidentally" [ [I Oops, I ${0} the whole ${noun}...I] ] with-string-writer "accidentally" [ I[[ Oops, I ${0} the whole ${noun}...]] ] with-string-writer
] ]
] unit-test ] unit-test

View File

@ -85,6 +85,6 @@ MACRO: interpolate-locals ( str -- quot )
: interpolate-locals>string ( str -- newstr ) : interpolate-locals>string ( str -- newstr )
[ interpolate-locals ] with-string-writer ; inline [ interpolate-locals ] with-string-writer ; inline
SYNTAX: [I SYNTAX: I[[
"I]" parse-multiline-string "]]" parse-multiline-string
interpolate-locals-quot append! ; interpolate-locals-quot append! ;