modern: handle \[[ \[=[

modern-harvey2
Doug Coleman 2017-08-26 13:56:49 -05:00
parent 161a50c0b8
commit 39a9b21e98
2 changed files with 4 additions and 1 deletions

View File

@ -88,3 +88,6 @@ IN: modern.tests
{ { { "\\" "(" } } } [ "\\ (" string>literals >strings ] unit-test
{ { "\\[[" } } [ "\\[[" string>literals >strings ] unit-test
{ { "\\[=[" } } [ "\\[=[" string>literals >strings ] unit-test
{ { "\\[==[" } } [ "\\[==[" string>literals >strings ] unit-test

View File

@ -275,7 +275,7 @@ ERROR: mismatched-terminator n string slice ;
[ "\"!:[{(<>\s\r\n" slice-til-either ] dip swap [ span-slices ] dip
over "\\" head? [
drop
dup "\\" sequence= [ read-backslash ] when
dup "\\" sequence= [ read-backslash ] [ merge-slice-til-whitespace ] if
] [
(lex-factor)
] if