(Arne Babenhauserheide)
2016-07-10: resolve the multiline-string bug resolve the multiline-string bug
diff --git a/.bugs/bugs b/.bugs/bugs --- a/.bugs/bugs +++ b/.bugs/bugs @@ -24,7 +24,7 @@ wisp-guile.w does not yet remove the lea inline ' : should be '( | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:72d534a8b23b4cb168017f1bb7d8816f0ea170c4, time:1366497335.26 failing test tests/shebang.w | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:74a851f83af8996465a7b24d8453161beb0f0fd5, time:1379106761.57 non-nested multiline comments with #! !#. Requires restructuring. | owner:, open:False, id:7a57614fa920b2ddad002d044b144d0bb7c34f84, time:1389364108.01 -wisp-guile: multiline-stringsn break. See tests/multiline-string.w | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:7e457dfe042341ea24d0b57c4f0f48fa3d9affc3, time:1462055749.4 +wisp-guile: multiline-stringsn break. See tests/multiline-string.w | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:7e457dfe042341ea24d0b57c4f0f48fa3d9affc3, time:1462055749.4 wisp-scheme: interpret , : as ,() similar to : , | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:85e150dcb10c49d8f51db525e07d24e83bdba0f1, time:1416432201.21 wisp-guile: support nested multi-line comments with #| ... |#: multiline comments (srfi-30). Requires restructuring. | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:8cf6202873d4454f57813dd17cf60432059f7c62, time:1389569421.6 wisp-scheme: Does not recognize the . #!curly-infix request for curly-infix or other reader syntax. | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:91f27adb7d4e378e034b3408b6e4616f707f9587, time:1418162368.88 diff --git a/wisp-guile.w b/wisp-guile.w --- a/wisp-guile.w +++ b/wisp-guile.w @@ -134,8 +134,8 @@ Ends with three consecutive linebreaks o not : char=? lastchar #\\ ; if the last char is not a backslash (escaped quote) ; or the last char is a backslash preceded by an uneven number of backslashes (so the backslash is actually an escaped backslash) and : char=? lastchar #\\ - ; not : equal? #f : string-match "\\([^\\]\\)+\\(\\\\\\\\\\)*[\\]$" text ; matches [^\](\\)*\$ - non-backslash + arbitrary number of pairs of backslashes + final backslash which undoes the escaping from the lastchar (by actually escaping the lastchar) - endsinunevenbackslashes text + ; if all backslashes before the lastchar are paired, the final quote is escaped. + not : endsinunevenbackslashes text char=? lastchar #\space ; when the last char was a space, I can get into a string char=? lastchar #\newline ; same for newline chars char=? lastchar #\return