(Arne Babenhauserheide)
2014-08-16: added bug and test for comments which can throw off the parser. added bug and test for comments which can throw off the parser.
diff --git a/.bugs/bugs b/.bugs/bugs --- a/.bugs/bugs +++ b/.bugs/bugs @@ -19,6 +19,7 @@ the repl does not require 3 returns when wisp-guile.w breaks on ";" and complex brackets with bracket char literals. See wisp-guile.w::91 | owner:, open:False, id:9d8b6f87fa5365733fc8655614dbf2a9ba5bd054, time:1377533321.27 FIX regression: empty line with only : does not remove the :. It transforms to (:, it should transform to ( | owner:, open:False, id:a2323d347612425bc5af577c939916c8b60ec1c9, time:1389631450.78 wisp-mode: handle lines starting with underscores: currently sees the underscores as function call. | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:b2c3755e1deb8355655a334d569679e2e62d2836, time:1376612093.55 +parens in comments can throw off the parser. | owner:, open:True, id:ce28d6c0d1f9894c9b946e56b17934473800edfe, time:1408224406.79 make this work: let : : origfile ( open-file : nth 1 : command-line ) r | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:d6de2074a5017f1f29f34d142ce797981ed270a0, time:1366529287.67 wisp.py breaks on \ - quote, escaped backslash, quote. Ignored, because wisp.py is only needed for bootstrapping. | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:d75a93ca58ade5b3e3e51f1e7ee9782e743ac131, time:1377424552.02 comments containing a closing parenthesis can break the parser. | owner:, open:False, id:d9147504868960e5fbc2648474d48ce5c9bd1a02, time:1374838747.22 diff --git a/.bugs/details/ce28d6c0d1f9894c9b946e56b17934473800edfe.txt b/.bugs/details/ce28d6c0d1f9894c9b946e56b17934473800edfe.txt new file mode 100644 --- /dev/null +++ b/.bugs/details/ce28d6c0d1f9894c9b946e56b17934473800edfe.txt @@ -0,0 +1,26 @@ +# Lines starting with '#' and sections without content +# are not displayed by a call to 'details' +# +[paths] +# Paths related to this bug. +# suggested format: REPO_PATH:LINENUMBERS +see tests/strangecomments.w tests/strangecomments.scm + +[details] +# Additional details + + +[expected] +# The expected result + + +[actual] +# What happened instead + + +[reproduce] +# Reproduction steps + + +[comments] +# Comments and updates - leave your name diff --git a/tests/strangecomments.scm b/tests/strangecomments.scm new file mode 100644 --- /dev/null +++ b/tests/strangecomments.scm @@ -0,0 +1,7 @@ +; expected: +; ((2 (foo)) (2) (0) (0) (2 foo : moo +; ) (4 #{.}# [goo #{.}# hoo])) +(display + (call-with-input-string " (foo) ; bar\n ; nop \n\n; nup\n; nup \n \n\n\n foo : moo \"\n\" \n___ . [goo . hoo]" wisp-scheme-read-chunk)) +(newline) + diff --git a/tests/strangecomments.w b/tests/strangecomments.w new file mode 100644 --- /dev/null +++ b/tests/strangecomments.w @@ -0,0 +1,6 @@ +; expected: +; ((2 (foo)) (2) (0) (0) (2 foo : moo +; ) (4 #{.}# [goo #{.}# hoo])) +display + call-with-input-string " (foo) ; bar\n ; nop \n\n; nup\n; nup \n \n\n\n foo : moo \"\n\" \n___ . [goo . hoo]" wisp-scheme-read-chunk +newline