interpolate: [I to I[[ ]]
parent
0f9b3926ef
commit
0e71afabe0
|
@ -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 ;
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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! ;
|
||||||
|
|
Loading…
Reference in New Issue