Changelog
0.15.8 (2022-02-04)
Fix a bug that caused reductions that didn't consume anything to sometimes end up outside their parent node in the tree.
Changelog
0.15.7 (2022-01-21)
Fix a bug that could cause some kinds of composite skipped expressions to not be parsed correctly.
Changelog
0.15.6 (2022-01-11)
Make sure tree depth does not grow unbounded, so that recursive tree traversal is safe from overflowing the stack.
Be less agressive about pruning long-running GLR parse splits.
Changelog
0.15.5 (2021-12-01)
Fix a bug that caused node lookahead to be one less than it should be.
Fix an issue that could cause the parser to, when recovering, parse beyond the position given to stopAt
.
Changelog
0.15.3 (2021-09-24)
Fix crashes or infinite recursion caused by applying forced reductions in situations where they were not valid.
Changelog
0.15.2 (2021-08-31)
Fix a bug where the parse position could get corrupted during a parse, leading to crashes or nonsensical output.
Changelog
0.15.1 (2021-08-16)
Fix an inconsistency in the .d.ts emitted by the build.
LRParser.configure
now takes a contextTracker
option to replace the context tracker used by the parser.
Changelog
0.15.0 (2021-08-11)
The module's name changed from lezer
to @lezer/lr
.
The Parser
class was renamed to LRParser
(Parser
is now the abstract class that all parsers extend).
Nested parsing is no longer handled inside the LR parser (instead, it is done by using parseMixed
from the @lezer/common
package as a wrapper).
External tokenizers are passed different arguments and get a different input stream abstraction (to make accidental uncontrolled lookahead and lookbehind, which were easy ways to break incremental parsing, harder).
Drops support for Stack.startOf
(which is no longer useful without lookbehind).
Context trackers also get passed different arguments, following the changed input stream format.
This package no longer re-exports bindings from @lezer/common
.
Slightly prefer deleting token to inserting them to avoid far-fetched parses.
Fix a problem where node reuse didn't take the amount of look-ahead done by the tokenizer into account, and could reuse nodes whose content would tokenize differently due to changes after them.
Track tokenizer lookahead to fix a problem where some incremental parses would produce incorrect results.
LR parsers now support a wrapper
configuration option that allows you to inject additional logic by wrapping the PartialParse
object it returns.