- Fixed to work for Node.js 10+
- Added
packTable
option for parsergenerateModule()
method (parser.generateModule("esm", { packTable: "advanced" })
), to employ a more sophisticated approach for packing BNF table, this is useful for large tables to reduce tens of kilobytes down to just a few kilobytes - Removed auto-resolved conflict warnings in non-debug mode
- Removed unnecessary
export
in generated ESM code
- Added
Lexer#setMatch(start, end)
method - Fixed updating
yytext
,yyleng
,yylloc
,yylineno
,offset
andmatch
on match changes
- Fixed
Lexer#showPosition()
input slicing - Added
Lexer#eof()
method - Added parameter
position
forLexer#showPosition()
- Changed
Lexer#_input
to contain entire input instead of unmatched input - Removed
Lexer#matched
- Removed
Lexer#pastInput()
- Removed
Lexer#upcomingInput()
- Restricted
Lexer#unput()
to allow unput only a part of match substring
- Fixed function body extraction for arrow functions in a rule action
- Dropped support for Node.js prior 10.10
- Reworked
Lexer
's code generation - Changed
Lexer
constructorLexer(dict, input, tokens)
→Lexer(dict, tokens)
- Renamed
Lexer.generate()
method intoLexer.generateModule()
- Removed support for
moduleName
inLexer#generateModule()
andLexer.generateModule()
methods - Added
format
option forLexer#generateModule(format)
andLexer.generateModule(dict, tokes, format)
methods. Supported formats arecjs
,esm
andiife
- Changed
Generator#generateModule(opts)
→Generator#generateModule(format)
- Reduced package size by omitting test files
- Removed web site sources
- Removed CLI & bundling. Those things may back in the future but in fresh way
- Removed generator methods except
generateModule
- Refactored to use ES6+ features, remove redundant abstractions, minor bug fixes
- Added support for function patterns in lexer