Use a DSL for grammar definition, and add next_token#564
Merged
AntonyBlakey merged 14 commits intoNomicFoundation:mainfrom Aug 23, 2023
AntonyBlakey:AntonyBlakey/to_rust_types
Merged
Use a DSL for grammar definition, and add next_token#564AntonyBlakey merged 14 commits intoNomicFoundation:mainfrom AntonyBlakey:AntonyBlakey/to_rust_types
AntonyBlakey merged 14 commits intoNomicFoundation:mainfrom
AntonyBlakey:AntonyBlakey/to_rust_types
Conversation
🦋 Changeset detectedLatest commit: da722fe The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Xanewok
reviewed
Aug 10, 2023
OmarTawfik
reviewed
Aug 11, 2023
OmarTawfik
reviewed
Aug 11, 2023
OmarTawfik
reviewed
Aug 11, 2023
OmarTawfik
reviewed
Aug 11, 2023
OmarTawfik
reviewed
Aug 11, 2023
OmarTawfik
reviewed
Aug 11, 2023
OmarTawfik
reviewed
Aug 11, 2023
OmarTawfik
reviewed
Aug 11, 2023
OmarTawfik
reviewed
Aug 11, 2023
crates/solidity/outputs/cargo/crate/src/generated/support/optional_helper.rs
Show resolved
Hide resolved
OmarTawfik
reviewed
Aug 11, 2023
OmarTawfik
reviewed
Aug 11, 2023
Xanewok
reviewed
Aug 11, 2023
Xanewok
suggested changes
Aug 14, 2023
Contributor
Xanewok
left a comment
There was a problem hiding this comment.
Looks great, however it's hard for me to do an in-depth review, since I am not familiar with the codebase from before this PR and the scope of the changes is very big, as it basically overhauls the parsing.
Left some notes, happy to merge it once we bring the changes from #561 back 🙏
OmarTawfik
reviewed
Aug 14, 2023
OmarTawfik
reviewed
Aug 14, 2023
OmarTawfik
reviewed
Aug 14, 2023
OmarTawfik
reviewed
Aug 14, 2023
OmarTawfik
reviewed
Aug 14, 2023
OmarTawfik
reviewed
Aug 14, 2023
OmarTawfik
reviewed
Aug 14, 2023
OmarTawfik
reviewed
Aug 22, 2023
OmarTawfik
reviewed
Aug 22, 2023
OmarTawfik
reviewed
Aug 22, 2023
Contributor
Author
I did. |
OmarTawfik
approved these changes
Aug 23, 2023
Xanewok
added a commit
to Xanewok/slang
that referenced
this pull request
Aug 23, 2023
Xanewok
added a commit
to Xanewok/slang
that referenced
this pull request
Aug 23, 2023
github-merge-queue bot
pushed a commit
that referenced
this pull request
Aug 24, 2023
They were disabled in #564 .. This enables them and updates the snapshots.
Closed
github-merge-queue bot
pushed a commit
that referenced
this pull request
Aug 29, 2023
Based on #564 EDIT: As asked, this was split into supporting PRs (#579, #580, merged now), doesn't use the Error CST node anymore and only contains terminated-by recovery. To support error side-channel in a backtracking scenario, `Vec<ParseError>` was added to the `Stream` which serves more as a parse context now. To backtrack, we first record the position of the stream and how many errors are there; then, we reset the errors and the position to the first recorded `Marker` struct (basically copying what `chumsky` does). This wasn't changed everywhere as `Stream::set_position` in the lexer will never emit errors (only parsers do), nor will the optional trivia parsers. I'm happy to polish the lexer interface a bit to accommodate for this change later, if that's okay. First, I wanted to make sure the approach is fine and accepted, until we proceed with the DelimitedBy error recovery.
Closed
Merged
github-merge-queue bot
pushed a commit
that referenced
this pull request
Sep 27, 2023
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @nomicfoundation/slang@0.10.0 ### Minor Changes - [#595](#595) [`1a258c4`](1a258c4) Thanks [@Xanewok](https://github.com/Xanewok)! - Attempt error recovery when parsing incomplete lists - [#564](#564) [`e326a06`](e326a06) Thanks [@AntonyBlakey](https://github.com/AntonyBlakey)! - Parsing operators with missing operands should no longer panic - [#564](#564) [`e326a06`](e326a06) Thanks [@AntonyBlakey](https://github.com/AntonyBlakey)! - Inline parse rules are no longer exposed to the API. - [#564](#564) [`e326a06`](e326a06) Thanks [@AntonyBlakey](https://github.com/AntonyBlakey)! - Scanners are no longer available as methods - use next_token instead - [#564](#564) [`e326a06`](e326a06) Thanks [@AntonyBlakey](https://github.com/AntonyBlakey)! - Scanners are now grouped into contexts to deal with contextual scanning ### Patch Changes - [#601](#601) [`cbd2a79`](cbd2a79) Thanks [@Xanewok](https://github.com/Xanewok)! - Attempt parser error recovery between bracket delimiters - [#599](#599) [`4bbad48`](4bbad48) Thanks [@Xanewok](https://github.com/Xanewok)! - Use correct versions for the `revert` and `global` keywords - [#561](#561) [`cb6a138`](cb6a138) Thanks [@Xanewok](https://github.com/Xanewok)! - Add preliminary documentation for the `solidity_language` Rust package Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
rollup-smithbm0p
added a commit
to rollup-smithbm0p/slang
that referenced
this pull request
Dec 26, 2025
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @nomicfoundation/slang@0.10.0 ### Minor Changes - [#595](NomicFoundation/slang#595) [`1a258c4`](NomicFoundation/slang@1a258c4) Thanks [@Xanewok](https://github.com/Xanewok)! - Attempt error recovery when parsing incomplete lists - [#564](NomicFoundation/slang#564) [`e326a06`](NomicFoundation/slang@e326a06) Thanks [@AntonyBlakey](https://github.com/AntonyBlakey)! - Parsing operators with missing operands should no longer panic - [#564](NomicFoundation/slang#564) [`e326a06`](NomicFoundation/slang@e326a06) Thanks [@AntonyBlakey](https://github.com/AntonyBlakey)! - Inline parse rules are no longer exposed to the API. - [#564](NomicFoundation/slang#564) [`e326a06`](NomicFoundation/slang@e326a06) Thanks [@AntonyBlakey](https://github.com/AntonyBlakey)! - Scanners are no longer available as methods - use next_token instead - [#564](NomicFoundation/slang#564) [`e326a06`](NomicFoundation/slang@e326a06) Thanks [@AntonyBlakey](https://github.com/AntonyBlakey)! - Scanners are now grouped into contexts to deal with contextual scanning ### Patch Changes - [#601](NomicFoundation/slang#601) [`cbd2a79`](NomicFoundation/slang@cbd2a79) Thanks [@Xanewok](https://github.com/Xanewok)! - Attempt parser error recovery between bracket delimiters - [#599](NomicFoundation/slang#599) [`4bbad48`](NomicFoundation/slang@4bbad48) Thanks [@Xanewok](https://github.com/Xanewok)! - Use correct versions for the `revert` and `global` keywords - [#561](NomicFoundation/slang#561) [`cb6a138`](NomicFoundation/slang@cb6a138) Thanks [@Xanewok](https://github.com/Xanewok)! - Add preliminary documentation for the `solidity_language` Rust package Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.