Skip to content

chore(deps): update rust crate pest_derive to v2.8.0 #13

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Dec 7, 2024

This PR contains the following updates:

Package Type Update Change
pest_derive (source) dev-dependencies minor 2.7.14 -> 2.8.0

Release Notes

pest-parser/pest (pest_derive)

v2.8.0

Compare Source

What's Changed
A new rule PUSH_LITERAL(...).

PUSH_LITERAL("a"): This rule always matches and never consumes any input, and it pushes "a" to the stack. The argument must be a literal.

[!note]
You need to enable the "grammar-extras" feature as mentioned in the semantic versioning notes below in order to use this feature.

This new rule accomplishes the goals of #​880 (in a slightly different way). Instead of PUSH_OTHER("-", " "), this is just PUSH_LITERAL(" "). If you wanted to match A and then push B, you just combine them via a sequence: "-" ~ PUSH_LITERAL(" ").

This can be used to generalize quoted strings to a pair of matching but non-equal delimiters. For example, many programming languages let you express strings using either double or single quotes, and don't require escaping of the other:

string = ${ PUSH( "\"" | "'") ~ quoted_char* ~ POP }
quoted_char = @​{!PEEK ~ ANY } // simple version without escape sequences

// will parse "a'b" or 'a"b'

This happens to work because the starting and ending char are the same, but that's not always desirable. For example, we may want to allow strings to be delimited by either ( ... ) or < ... >, with similar rules as above, such that (a>) and <a)> are both valid.

With PUSH_LITERAL, this becomes:

string = ${ quote_open ~ quoted_char* ~ POP }
quote_open = @&#8203;{
  ( "(" ~ PUSH_LITERAL(")") )
| ( "<" ~ PUSH_LITERAL(">") )
}
quoted_char = @&#8203;{!PEEK ~ ANY } // simple version without escape sequences
New Contributors

Full Changelog: pest-parser/pest@v2.7.15...v2.8.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.8", features = ["grammar-extras"] }

v2.7.15

Compare Source

What's Changed

New Contributors

Full Changelog: pest-parser/pest@v2.7.14...v2.7.15

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"] }

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot changed the title chore(deps): update rust crate pest_derive to v2.7.15 chore(deps): update rust crate pest_derive to v2.8.0 Mar 26, 2025
@renovate renovate bot force-pushed the renovate/pest_derive-2.x-lockfile branch from cd3972f to fa49e10 Compare March 26, 2025 23:43
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants