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
[
[I
I[[
#include <vm/master.h>
#include <stdio.h>
#include <stdbool.h>
@ -32,7 +32,7 @@ int main(int argc, char **argv)
printf("Done.\n");
return 0;
}
I]
]]
] with-string-writer
[ compile-file ] with-temp-directory
[ run-test ] with-temp-directory ;

View File

@ -40,6 +40,6 @@ in: interpolate.tests
{ "Oops, I accidentally the whole economy..." } [
let[
"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

View File

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