Skip to content

Commit

Permalink
Merge pull request #339 from hildjj/release-prep
Browse files Browse the repository at this point in the history
Release prep
  • Loading branch information
hildjj authored Feb 21, 2023
2 parents 2904d18 + eec2257 commit 22b2132
Show file tree
Hide file tree
Showing 17 changed files with 420 additions and 302 deletions.
66 changes: 52 additions & 14 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,66 @@ Change Log

This file documents all notable changes to Peggy.

Unreleased
----------
3.0.0
-----

Released: TBD
Released: 2023-02-21

### Major Changes

- [#280](https://github.com/peggyjs/peggy/issues/280) Add inline examples to
the documentation, from @hildjj
- [#240](https://github.com/peggyjs/peggy/issues/240) Generate SourceNodes for bytecode
- [#338](https://github.com/peggyjs/peggy/pull/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.
- [#291]: Add support for repetition operator `expression|min .. max, delimiter|`, from @Mingun

Important information for plug-ins' authors: PR [#291] added 4 new opcodes to the bytecode:
- [#240](https://github.com/peggyjs/peggy/issues/240) Generate SourceNodes for
bytecode, from @hildjj
- [#338](https://github.com/peggyjs/peggy/pull/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](https://github.com/peggyjs/peggy/pull/291): Add support for
repetition operator `expression|min .. max, delimiter|`, from @Mingun
- [#339](https://github.com/peggyjs/peggy/pull/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 forgot to update your plug-ins.

[#291]: https://github.com/peggyjs/peggy/pull/291
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](https://github.com/peggyjs/peggy/issues/274) Use commander's new
`.conflicts()` to check for mutually-exclusive CLI options, from @hildjj
- [#274](https://github.com/peggyjs/peggy/issues/274) `"*"` is now a valid `allowedStartRule`, which means all rules are allowed, from @hildjj
- [#229](https://github.com/peggyjs/peggy/issues/229) new CLI option
`-S <rule>` or `--start-rule <rule>` to specify the start rule when testing,
Expand All @@ -47,12 +80,17 @@ and added a new AST node and a visitor method `repeated`. Do not forgot to updat
(can be useful for plugin writers), from @Mingun
- [#294](https://github.com/peggyjs/peggy/pull/294) Website: show errors in the
editors, from @Mingun
- [#297](https://github.com/peggyjs/peggy/pull/297) Website: add Discord widget,
from @hildjj
- [#299](https://github.com/peggyjs/peggy/issues/299) Add example grammar for a
[SemVer.org](https://semver.org) semantic version string, from @dselman
- [[#307](https://github.com/peggyjs/peggy/issues/307)] Allow grammars to have
relative offsets into their source files (e.g. if embedded in another doc),
from @hildjj.
- [#308](https://github.com/peggyjs/peggy/pull/308) Add support for reading test data from stdin using `-T -`, from @hildjj.
- [#308](https://github.com/peggyjs/peggy/pull/308) Add support for reading test
data from stdin using `-T -`, from @hildjj.
- [#313](https://github.com/peggyjs/peggy/pull/313) Create the website using
eleventy, from @camcherry

### Bug Fixes

Expand Down
16 changes: 8 additions & 8 deletions bin/peggy-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ class PeggyCLI extends Command {
.default([], "the first rule in the grammar")
.argParser(commaArg)
)
.addOption(
new Option(
"--ast",
"Output a grammar AST instead of a parser code"
)
.default(false)
.conflicts(["test", "testFile", "sourceMap"])
)
.option(
"--cache",
"Make generated parser cache results",
Expand Down Expand Up @@ -172,14 +180,6 @@ class PeggyCLI extends Command {
"-m, --source-map [mapfile]",
"Generate a source map. If name is not specified, the source map will be named \"<input_file>.map\" if input is a file and \"source.map\" if input is a standard input. If the special filename `inline` is given, the sourcemap will be embedded in the output file as a data URI. If the filename is prefixed with `hidden:`, no mapping URL will be included so that the mapping can be specified with an HTTP SourceMap: header. This option conflicts with the `-t/--test` and `-T/--test-file` options unless `-o/--output` is also specified"
)
.addOption(
new Option(
"--ast",
"Output a grammar AST instead of a parser code"
)
.default(false)
.conflicts(["test", "testFile", "sourceMap"])
)
.option(
"-S, --start-rule <rule>",
"When testing, use the given rule as the start rule. If this rule is not in the allowed start rules, it will be added."
Expand Down
4 changes: 2 additions & 2 deletions docs/_includes/components/footer.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<footer id="footer">
Copyright &copy; 2022
Copyright &copy; 2023
<a href="https://github.com/peggyjs/peggy/blob/main/AUTHORS"
>The Peggy Authors</a
>
&bull;
<a href="https://github.com/peggyjs/peggy">Source code</a>
</footer>
</footer>
Loading

0 comments on commit 22b2132

Please sign in to comment.