modern: fix data-map!( -- ) parsing.

locals-and-roots
Doug Coleman 2016-06-21 17:05:15 -07:00
parent fee7f45206
commit 0167ab0614
2 changed files with 6 additions and 2 deletions

View File

@ -417,7 +417,7 @@ ERROR: closing-tag-required lexer tag ;
! Words like append! and suffix! are allowed for now.
: read-exclamation ( lexer slice -- obj )
dup { [ "!" sequence= ] [ "#!" sequence= ] } 1||
[ take-comment ] [ merge-lex-til-whitespace make-tag-literal ] if ;
[ take-comment ] [ >>partial [ 1 + ] change-n lex-factor ] if ;
: read-backtick ( lexer opening -- obj )

View File

@ -73,4 +73,8 @@ in: modern.out.tests
{ t } [ "lol[==[abc]==]" rewrite-same-string ] unit-test
{ t } [ "![==[abc]==]" rewrite-same-string ] unit-test
{ t } [ "( :union{ fixnum bignum } -- )" rewrite-same-string ] unit-test
{ t } [ "( :union{ fixnum bignum } -- )" rewrite-same-string ] unit-test
{ t } [ "data-map!( int -- float[2] )" rewrite-same-string ] unit-test
{ t } [ "a!" rewrite-same-string ] unit-test
{ t } [ "!" rewrite-same-string ] unit-test
{ t } [ "!a" rewrite-same-string ] unit-test