Releases: pest-parser/pest
v2.7.1
What's Changed
- one-or-more rule fix based on #397 by @tomtau in #878
- Make the root a value. by @nathanhammond in #884
- Merging Spans ♻️ by @0nyr in #887
- Implement core::fmt::Display for OptimizedExpr by @TheVeryDarkness in #889
- Adding get_input() to types that already have public as_str() 🏷️ by @0nyr in #890
New Contributors
- @nathanhammond made their first contribution in #884
- @0nyr made their first contribution in #887
- @TheVeryDarkness made their first contribution in #889
Full Changelog: v2.7.0...v2.7.1
Warning: Semantic Versioning
Note that the node tag feature in 2.6.0 was a technically semver-breaking change even though it is a backwards-compatible / non-breaking change in the meta-grammar. There may be similar non-breaking changes to the meta-grammar between minor versions in the future. These non-breaking changes, however, may translate into semver-breaking changes due to the additional variants propagated from the generated Rule enum.
This new feature caused issues in some Cargo version resolution situations where Cargo mixed different versions of pest dependencies. For this reason, these "grammar non-breaking but semver-breaking" changes are now available only under the "grammar-extras" feature flag. If you would like to use node tags (or other future grammar features), you can do so by enabling this flag on the pest_derive crate in your Cargo.toml:
...
pest_derive = { version = "2.7", features = ["grammar-extras"] }
Restoration of the pest3 work effort
We started a new discussion thread to brainstorm ideas for pest3, both in terms of breaking grammar and API changes. You can check it out here: #885
v2.7.0
What's Changed
- bump criterion and cargo dependencies by @tomtau in #869
- feature-guard the new grammar features with "grammar-extras" by @tomtau in #871
- Add reference to json5-nodes by @jlyonsmith in #873
- fix: expose the unicode emoji builtin rules by @tomtau in #874
New Contributors
- @jlyonsmith made their first contribution in #873
Full Changelog: v2.6.1...v2.7.0
Warning: Semantic Versioning
Note that the node tag feature in 2.6.0 was a technically semver-breaking change even though it is a backwards-compatible / non-breaking change in the meta-grammar. There may be similar non-breaking changes to the meta-grammar between minor versions in the future. These non-breaking changes, however, may translate into semver-breaking changes due to the additional variants propagated from the generated Rule enum.
This new feature caused issues in some Cargo version resolution situations where Cargo mixed different versions of pest dependencies. For this reason, these "grammar non-breaking but semver-breaking" changes are now available only under the "grammar-extras" feature flag. If you would like to use node tags (or other future grammar features), you can do so by enabling this flag on the pest_derive crate in your Cargo.toml:
...
pest_derive = { version = "2.7", features = ["grammar-extras"] }
Note that MSRV was increased to 1.60 in pest 2.7.0.
v2.6.1: pest as a git dependency
What's Changed
- ci: fix for cargo-msrv needing at least 1.59 now by @tomtau in #850
- Mitigate errors in reporting grammars that can cause the parser to run indefinetely by @Tartasprint in #848
- Removed TODO about removed box syntax by @Tartasprint in #854
- derive/examples: add a help menu grammar and parser by @e-dant in #856
- feat: add simple Position/Span From implementations for LineColLocation by @HoloTheDrunk in #860
- Swap precedence of negation and factorial by @SandaruKasa in #865
- Conditional source-tree bootstrapping by @tomtau and @iptq in #866
New Contributors
- @Tartasprint made their first contribution in #848
- @e-dant made their first contribution in #856
- @HoloTheDrunk made their first contribution in #860
- @SandaruKasa made their first contribution in #865
Full Changelog: v2.6.0...v2.6.1
Using pest as a git dependency
pest v2.6.1 contains a patch for the longstanding problem that pest couldn't be used as a git dependency due to the bootstrapping process. It should be possible now with a special feature flag as follows:
pest = { git = "https://github.com/.../pest.git", rev = "..." }
pest_derive = { git = "https://github.com/.../pest.git", rev = "...", features = ["not-bootstrap-in-src"]}
Note that the compilation time will be higher due to the cargo library dependency. If that becomes an issue, you can still use the old workarounds, e.g. cloning the repo, running cargo bootstrap there and specifying the dependency as a path to the locally cloned repo instead of git.
Warning: Semantic Versioning
Note that the node tag feature in 2.6.0 was a technically semver-breaking change even though it is a backwards-compatible / non-breaking change in the meta-grammar. There may be similar non-breaking changes to the meta-grammar between minor versions in the future. These non-breaking changes, however, may translate into semver-breaking changes due to the additional variants propagated from the generated Rule enum. This is a known issue and will be fixed in the future (e.g. by increasing MSRV and non_exhaustive annotations).
If you face a dependency problem where Cargo mixes different versions of pest due to transitive dependencies: #849 (comment) you can try adding the older pest to explicitly force it as follows:
pest = { version = "=2.5.6" }
v2.6.0: node tags
What's Changed
- Add basic support for
node_tag, iterator, and meta grammar by @tomtau in #832 - Fix #838 grammar error when only have
//!,///or//, allow writing empty pest grammar. by @huacnlee in #839 - Implement
ExactSizeIteratorforPairiterators by @MucTepDayH16 in #833 - fuzz: decrease the call limit in the json fuzzer by @tomtau in #841
New Contributors
- @MucTepDayH16 made their first contribution in #833
Full Changelog: v2.5.7...v2.6.0
Introducing node tags
pest v2.6.0's grammar includes a new (optional) feature for labelling parts of rules (based on this idea posted by @oovm : #550 ), e.g.:
add = {#lhs = expr ~ "+" ~ #rhs = epxr}
This feature can help to distinguish tokens by labels instead of positions (which can help to reduce boilerplate code). You can read more about it here: https://pest.rs/book/grammars/syntax.html#tags
Warning: Semantic Versioning
Note that the node tag feature in 2.6.0 is a technically semver-breaking change even though it is a backwards-compatible / non-breaking change in the meta-grammar. There may be similar non-breaking changes to the meta-grammar between minor versions in the future. These non-breaking changes, however, may translate into semver-breaking changes due to the additional variants propagated from the generated Rule enum. This is a known issue and will be fixed in the future (e.g. by increasing MSRV and non_exhaustive annotations).
v2.5.7
What's Changed
- Fixup lifetimes of PrattParser by @matanui159 in #824
- Update syn to v2 by @CosmicHorrorDev in #826
- doc: add a link to awesome-pest by @tomtau in #828
New Contributors
- @matanui159 made their first contribution in #824
- @CosmicHorrorDev made their first contribution in #826
Full Changelog: v2.5.6...v2.5.7
v2.5.6
What's Changed
- Fix multiple grammars not always recompile issue #789 by @huacnlee in #790
- Update benchmark result typo (with Pest v2.5.2 as base line). by @huacnlee in #794
- Fix grammar
////parsing error. by @huacnlee in #818 - doc: added a note regarding the no_std support by @tomtau in #819
Full Changelog: v2.5.5...v2.5.6
pest_fmt and Visual Studio Code extension
Thanks to the great work of @huacnlee , @Jamalam360 and others, the new version of pest_fmt was published and the Visual Studio Code extension for pest was released on the Marketplace: https://marketplace.visualstudio.com/items?itemName=pest.pest-ide-tools
v2.5.5
What's Changed
- fix: typo in pest_debugger by @Jamalam360 in #780
- Feature: Simple update checker for pest_debugger by @Jamalam360 in #779
- Update validator for ignore
Rule::line_docfor fix #781 "already defined" error. by @huacnlee in #782 - Add
LineIndexinstead ofPairs::move_cursorfor improvePairs::nextandPair::line_colperformance. by @huacnlee in #785 - chore: added docs for semver changes in grammar + remove fast-col-line by @tomtau in #787
New Contributors
- @Jamalam360 made their first contribution in #780
Full Changelog: v2.5.4...v2.5.5
Warning: Semantic Versioning
The "fast-col-line" feature was removed, because it's superseded by the line_col method on Pairs (which has a better or similar performance): #785 (comment)
Note that the rustdoc support in 2.5.4: #765 was a semver-breaking change even though it was a backwards-compatible / non-breaking change in the meta-grammar. There may be similar non-breaking changes to the meta-grammar
between minor versions in the future. These non-breaking changes, however, may translate into semver-breaking changes due to the additional variants propagated from the generated Rule enum. This is a known issue and will be fixed in the future (e.g. by increasing MSRV and non_exhaustive annotations).
v2.5.4
What's Changed
- Fix incorrect
colcalculate forpair.line_colmethod, and add integration test for cover it. by @huacnlee in #768 - CI use Rust 1.62.0 for fix rustyline 10.1.0
#[default]compile error. by @huacnlee in #770 - Add to support
///and//!syntax for add doc comment for rules. by @huacnlee in #765 - doc: added doc comments to the meta-grammar by @tomtau in #774
Full Changelog: v2.5.3...v2.5.4
v2.5.3
What's Changed
- Improve line, col calculate performance by use move cursor on Pairs Iterator. by @huacnlee in #754
- Add to support load multiple grammars for derive generator. by @huacnlee in #758
- #763 Switches SHA1 for SHA2 by @jeramyRR in #764
- fix: restrict the factorizer case to only atomic and compoundatomic rules by @tomtau in #766
New Contributors
Full Changelog: v2.5.2...v2.5.3