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