modern: converting payload to string too early.

locals-and-roots
Doug Coleman 2016-06-20 16:17:43 -07:00
parent ef09fbe3b4
commit f0f762de1e
2 changed files with 15 additions and 2 deletions

View File

@ -335,7 +335,7 @@ MACRO:: read-matched ( ch -- quot: ( lexer tag -- slice' ) )
lexer n>> :> n
lexer read-string-payload :> ( n' string slice )
n' [ n string string-expected-got-eof ] unless
n n' 1 - string <slice> >string
n n' 1 - string <slice>
n' 1 - n' string <slice>
tag 1 cut-slice* dquote-literal make-matched-literal ;
@ -548,4 +548,15 @@ vocab-roots get [ vocabs-from reject-some-paths ] map concat
"bunny.cel-shaded" "bunny.outlined"
} diff
[ modern-source-path dup <pathname> . path>literals ] map-zip
vocab-roots get [ vocabs-from reject-some-paths ] map concat
{
"specialized-arrays" "specialized-vectors"
"math.blas.matrices" "math.blas.vectors" "math.vectors.simd"
"math.vectors.simd.cords" "game.debug" "gpu.util" "gpu.effects.blur"
"gpu.effects.step" "model-viewer" "terrain.shaders" "spheres"
"bunny.cel-shaded" "bunny.outlined"
} diff
[ modern-source-path ] map
[ ] rewrite-paths
]]

View File

@ -60,3 +60,5 @@ in: modern.out.tests
{ t } [ "<{ ptx-2op-instruction ptx-float-ftz }" rewrite-same-string ] unit-test
{ t } [ "foo<{ ptx-2op-instruction ptx-float-ftz }" rewrite-same-string ] unit-test
{ t } [ [[ [ dup 0 > [ number>string ] [ drop "No more" ] if ] ]] [ ] rewrite-same-string ] unit-test