From a78ed3b5ff93d2e10aeefbd7fbb123720aeeecae Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Fri, 2 Sep 2022 14:55:11 +0200 Subject: [PATCH] Add note --- notes.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/notes.txt b/notes.txt index 41d94f9..54d59df 100644 --- a/notes.txt +++ b/notes.txt @@ -27,4 +27,5 @@ Thoughts: - FIXME/MARKER: regex parsing cannot work in either stremaing *or* mixed-mode parsing, because with the language implementation of regex it is unknowable whether it failed due to a mismatch or due to running out of Input - Provide a custom character range operation instead - ensure that this correctly handles the astral plane, since those characters are two codepoints in JS (with UCS-2) rather than one (as in UTF-8) - - also need to make sure to get the *codepoint* of characters for determining the ranges, not the first/single byte value (which I think charcodeAt does?) \ No newline at end of file + - also need to make sure to get the *codepoint* of characters for determining the ranges, not the first/single byte value (which I think charcodeAt does?) +- Need a trackBranch wrapper for custom `either` implementations and such, to make the core aware of when branching is occurring - this is necessary for both reasonable errors ("expected X or Y or Z") as well as input management; in streaming modes, earlier input can only be discarded once it becomes unreachable for backtracking, which is only the case when there are no remaining levels of branching in the parsing tree \ No newline at end of file