From e9fee4c0e170b83e6d5b853654abb522af8a3046 Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Tue, 16 Jul 2024 20:16:28 -0400 Subject: [PATCH] make some additional comments re: off-by-one error errors --- src/parser.janet | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/parser.janet b/src/parser.janet index 4088874..01c9b37 100644 --- a/src/parser.janet +++ b/src/parser.janet @@ -357,6 +357,11 @@ {:type :synthetic :data [;terms] :token origin}) # collections +### XXX: the current panic/capture structure in this, script, etc. is blowing up when the LAST element (line, tuple member, etc.) has an error +# it does, however, work perfectly well when there isn't one +# there's something about advancing past the breaking token, or not +# aslo, I removed the captures here around nonbinding and separators, and we got into a loop with a panic +# oy (defn- tup [parser] (def origin (current parser)) (advance parser) # consume the :lparen @@ -1140,7 +1145,7 @@ (do # (comment (def source ` -(,,,,,1, 2 bar, foo) +(,,,,,1, 2, foo) `) (def scanned (s/scan source))