From 610aaad39b888898003dbcc057055c95883918b3 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 15 Mar 2014 16:28:50 -0700 Subject: * parser.l: Bugfix. When handling a backslash-newline continuation in the SPECIAL, NESTED and BRACED states, do not pop the state in all three, only in SPECIAL (to terminate the @\ continuation). * txr.1: Eliminate wrong claim that string literals do not split across lines, which is directly contradicted two paragraphs later. Document that quasiliterals also split. * genvim.txr (txr_regex, txl_regex): These definitions change from "syn match" to "syn region" so that the backslash-newline continuation can be properly handled. (txr_string, txr_quasilit): Correctly handle split literals. * txr.vim: Regenerated. --- txr.1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'txr.1') diff --git a/txr.1 b/txr.1 index 0c86dd5d..08806828 100644 --- a/txr.1 +++ b/txr.1 @@ -1097,8 +1097,8 @@ Scheme language. Note that #\elinefeed and #\enewline are the same character. .SS String Literals -String literals are delimited by double quote respectively, and may not span -multiple lines. A double quote within a string literal is encoded using \e" +String literals are delimited by double quote respectively. +A double quote within a string literal is encoded using \e" and a backslash is encoded as \e\e. Backslash escapes like \en and \et are recognized, as are hexadecimal escapes like \exFF or \exxabc and octal escapes like \e123. Ambiguity between an escape and subsequent @@ -1130,6 +1130,9 @@ syntax. Expressions within variables substitutions follow the evaluation rules of TXR Lisp when the quasiliteral occurs in TXR Lisp, and the rules of the TXR pattern language when the quasiliteral occurs in the pattern language. +Quasliterals can be split into multiple lines in the same way as ordinary +string literals. + .SS Numbers TXR supports integers and floating-point numbers. -- cgit v1.2.3