All notable changes will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Renamed
CustomLexerContexttoLexCursorand separated it from thecontext.Contexttype. - Renamed
ParserContexttoParseCursorand separated it from thecontext.Contexttype.
0.3.0 - 2026-01-25
- Refactored
CustomLexerto add a newCustomLexerContexttype that is passed to state functions. This context provides access to the underlyingLexeras well as additional helper methods for lexing. - Refactored
Parserto add a newParserContexttype that is passed to state functions. This context provides access to the underlyingParseras well as additional helper methods for parsing. - Updated the
CustomLexerto not returnio.EOFfromCustomLexer.Err. It should only return unexpected errors (#170). - Fixed an issue where the
Filenamefield was not set onPositionvalues returned by theCustomLexerandScanningLexer(#169).
0.2.0 - 2025-10-31
- The EOF token emitted by the
Lexernow includes the position where the EOF is encountered. - The
Parsernow includesNewNodeandSetRootmethods. These methods are useful for parsers that need to build the parse tree themselves instead of using the default methods on theParser. - The
LexerAPI has been completely redesigned. ALexerinterface was added and there are now two implementations:ScanningLexerandCustomLexer.ScanningLexeris based ontext/scannerand can handle many use cases.CustomLexerallows for more custom lexing behavior to be implemented (#129).
0.1.0 - 2025-02-24
- Initial release