Revert "regexp: fix take-until to handle escapes at the end of a regexp."
This reverts commit 2136abc1d6
.
windows-drag
parent
6339558368
commit
b3bcf537cc
|
@ -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 ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue