Breaking changes: node 14+ and reserved words
3.0.0
Released: 2023-02-21
Major Changes
- #280 Add inline examples to the documentation, from @hildjj
- #240 Generate SourceNodes for bytecode, from @hildjj
- #338 BREAKING CHANGE. Update dependencies, causing minimum supported version of node.js to move to 14. Generated grammar source should still work on older node versions and some older browsers, but testing is currently manual for those. from @hildjj
- #291: Add support for repetition operator
expression|min .. max, delimiter|
, from @Mingun - #339: BREAKING CHANGE. Updated the list of JavaScript reserved words. This will break existing grammars that use any of the new words in their rule or label names. from @hildjj
Important information for plug-in authors: PR [#291] added 4 new opcodes to the bytecode:
IF_LT
IF_GE
IF_LT_DYNAMIC
IF_GE_DYNAMIC
and added a new AST node and a visitor method repeated
. Do not forget to update your plug-ins.
Important information for grammar authors: the following words, which used to be valid identifiers for rules and labels, are now treated as JavaScript reserved words, and will cause errors at compile time if you are using them:
- abstract
- arguments
- as
- async
- boolean
- byte
- char
- double
- eval
- final
- float
- from
- get
- goto
- int
- long
- native
- of
- set
- short
- synchronized
- throws
- transient
- volatile
Minor Changes
- #274
"*"
is now a validallowedStartRule
, which means all rules are allowed, from @hildjj - #229 new CLI option
-S <rule>
or--start-rule <rule>
to specify the start rule when testing, from @hildjj - #236 Website: show line numbers in parser input textarea, from @Mingun
- #280 new output type
source-with-inline-map
, which generates source text with an inline map, from @hildjj - #285 Require that a non-empty string be given as a grammarSource if you are generating a source map, from @hildjj
- #206: New output type
ast
and an--ast
flag for the CLI to get an internal grammar AST for investigation (can be useful for plugin writers), from @Mingun - #294 Website: show errors in the editors, from @Mingun
- #297 Website: add Discord widget, from @hildjj
- #299 Add example grammar for a SemVer.org semantic version string, from @dselman
- [#307] Allow grammars to have relative offsets into their source files (e.g. if embedded in another doc), from @hildjj.
- #308 Add support for reading test data from stdin using
-T -
, from @hildjj. - #313 Create the website using eleventy, from @camcherry