modern: more fixes for partial progress.

locals-and-roots
Doug Coleman 2016-06-21 17:20:51 -07:00
parent 66a9842c96
commit 69997a3f21
2 changed files with 5 additions and 2 deletions

View File

@ -452,14 +452,14 @@ ERROR: mismatched-terminator lexer slice ;
] if ; ] if ;
: gt-terminator ( lexer slice -- slice/f ) : gt-terminator ( lexer slice -- slice/f )
dupd merge-lex-til-whitespace dup top-level-greater-than? [ dup top-level-greater-than? [
2dup [ dup peek-tag ] dip delimiters-match? [ 2dup [ dup peek-tag ] dip delimiters-match? [
nip terminator-literal make-tag-class-literal nip terminator-literal make-tag-class-literal
] [ ] [
roll-back-lexer f roll-back-lexer f
] if ] if
] [ ] [
nip make-tag-literal >>partial [ 1 + ] change-n lex-factor
] if ; ] if ;
: ?blank? ( ch/f -- blank/f ) : ?blank? ( ch/f -- blank/f )

View File

@ -78,3 +78,6 @@ in: modern.out.tests
{ t } [ "a!" rewrite-same-string ] unit-test { t } [ "a!" rewrite-same-string ] unit-test
{ t } [ "!" rewrite-same-string ] unit-test { t } [ "!" rewrite-same-string ] unit-test
{ t } [ "!a" rewrite-same-string ] unit-test { t } [ "!a" rewrite-same-string ] unit-test
{ t } [ "->[ ]" rewrite-same-string ] unit-test
{ t } [ "abc>[ ]" rewrite-same-string ] unit-test