diff --git a/extra/modern/modern.factor b/extra/modern/modern.factor index 7c3845f3ee..f1eccdbd10 100644 --- a/extra/modern/modern.factor +++ b/extra/modern/modern.factor @@ -277,7 +277,7 @@ ERROR: mismatched-terminator n string slice ; drop dup "\\" sequence= [ read-backslash ] [ merge-slice-til-whitespace ] if ] [ - (lex-factor) + over "\\" tail? [ drop read-backslash ] [ (lex-factor) ] if ] if ] [ (lex-factor) diff --git a/extra/modern/slices/slices.factor b/extra/modern/slices/slices.factor index aea85e1ced..9967ef094f 100644 --- a/extra/modern/slices/slices.factor +++ b/extra/modern/slices/slices.factor @@ -82,14 +82,14 @@ ERROR: unexpected-end n string ; f string f f ] if ; inline -:: slice-until' ( n string quot -- n' string slice/f ch/f ) +:: (slice-until) ( n string quot -- n' string slice/f ch/f ) n string quot find-from :> ( n' ch ) n' string n n' string ? ch ; inline : slice-until ( n string quot -- n' string slice/f ) - slice-until' drop ; inline + (slice-until) drop ; inline :: slice-til-not-whitespace ( n string -- n' string slice/f ch/f ) n [ @@ -147,13 +147,13 @@ ERROR: unexpected-end n string ; : slice-before ( slice -- slice' ) [ drop 0 ] [ from>> ] [ seq>> ] tri ; -: ?nth' ( n/f string/f -- obj/f ) - over [ ?nth ] [ 2drop f ] if ; +: (?nth) ( n/f string/f -- obj/f ) + over [ (?nth) ] [ 2drop f ] if ; :: merge-slice-til-eol-slash' ( n string slice -- n' string slice/f ch/f ) n string merge-slice-til-eol-slash'' :> ( n' string' slice' ch' ) ch' char: \\ = [ - n' 1 + string' ?nth' "\r\n" member? [ + n' 1 + string' (?nth) "\r\n" member? [ n' 2 + string' slice slice' span-slices merge-slice-til-eol-slash' ] [ "omg" throw