multiline: fix lexer eof detection.

db4
John Benediktsson 2014-05-19 21:10:31 -07:00
parent 8645b1db49
commit afdec2de61
1 changed files with 5 additions and 2 deletions

View File

@ -12,7 +12,7 @@ ERROR: bad-heredoc identifier ;
lexer get [ line-text>> ] [ column>> ] bi tail ;
: next-line-text ( -- str )
lexer get dup next-line line-text>> ;
lexer get [ next-line ] [ line-text>> ] bi ;
: (parse-here) ( -- )
next-line-text [
@ -38,9 +38,12 @@ SYNTAX: STRING:
<PRIVATE
: lexer-eof? ( lexer -- ? )
[ line>> ] [ text>> length ] bi <= ;
:: (scan-multiline-string) ( i end -- j )
lexer get line-text>> :> text
text [
lexer get lexer-eof? [
end text i start* [| j |
i j text subseq % j end length +
] [