Skip to content

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 31, 2025

Bumps pest_derive from 2.7.15 to 2.8.0.

Release notes

Sourced from pest_derive's releases.

v2.8.0

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 pest-parser/pest#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 = @{
  ( "(" ~ PUSH_LITERAL(")") )
| ( "<" ~ PUSH_LITERAL(">") )
}
quoted_char = @{!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.

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [pest_derive](https://github.com/pest-parser/pest) from 2.7.15 to 2.8.0.
- [Release notes](https://github.com/pest-parser/pest/releases)
- [Commits](pest-parser/pest@v2.7.15...v2.8.0)

---
updated-dependencies:
- dependency-name: pest_derive
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added A-Dependencies Pull requests that update a dependency file Z-Deps-Backend Updates to the backend dependencies labels Mar 31, 2025
Copy link

cloudflare-workers-and-pages bot commented Mar 31, 2025

Deploying matrix-authentication-service-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: e85bcf9
Status: ✅  Deploy successful!
Preview URL: https://d9ca773e.matrix-authentication-service-docs.pages.dev
Branch Preview URL: https://dependabot-cargo-pest-derive-gztr.matrix-authentication-service-docs.pages.dev

View logs

@sandhose sandhose merged commit a6418d1 into main Mar 31, 2025
30 checks passed
@sandhose sandhose deleted the dependabot/cargo/pest_derive-2.8.0 branch March 31, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Dependencies Pull requests that update a dependency file Z-Deps-Backend Updates to the backend dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant