Revert "regexp: fix take-until to handle escapes at the end of a regexp."

This reverts commit 2136abc1d6.
windows-drag
John Benediktsson 2019-03-18 10:42:40 -07:00
parent 6339558368
commit b3bcf537cc
1 changed files with 4 additions and 5 deletions

View File

@ -200,11 +200,10 @@ PRIVATE>
: take-until ( lexer -- string ) : take-until ( lexer -- string )
dup skip-blank [ dup skip-blank [
dupd [ dupd [
[ [ "\\/" member? ] find-from ] keep swap [ [ CHAR: / -rot index-from ] keep
CHAR: \ = [ [ 2 + ] dip t ] [ f ] if over [ "Unterminated regexp" throw ] unless
] [ 2dup [ 1 - ] dip nth CHAR: \\ =
"Unterminated regexp" throw [ [ [ 1 + ] dip ] when ] keep
] if*
] loop over [ subseq ] dip 1 + ] loop over [ subseq ] dip 1 +
] change-lexer-column ; ] change-lexer-column ;