Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Remove remaining mentions of #638 in the code #1021

Merged

Conversation

Xanewok
Copy link
Contributor

@Xanewok Xanewok commented Jun 21, 2024

Closes #638

The trivia item from #638 is now separately tracked in #1020.

@Xanewok Xanewok requested a review from a team as a code owner June 21, 2024 12:36
Copy link

changeset-bot bot commented Jun 21, 2024

⚠️ No Changeset found

Latest commit: 46cf20f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@@ -1,8 +1,4 @@
//! Definitions of the [`GrammarElement`]s and the grammar itself ([`Grammar`]).
// TODO(#638): This is a leftover module from the original DSLv1 implementation.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We agreed that we want to keep the grammar around as a structured representation of the language definition for the purposes of parser generator, so this stays. Everything is co-located as well, so it's a lot easier to edit and adapt the code if needed.

@@ -10,7 +10,6 @@ pub enum TriviaParser {
Choice { parsers: Vec<TriviaParser> },

Optional { parser: Box<TriviaParser> },
// TODO(#638): Remove this, once we adapt the DSL v1 codegen model to the new v2 definition.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anything that will touch the trivia as part of the #1020 will probably have to adapt this but doesn't strictly have to, so there's no point in keeping this TODO as it's optional and tracked elsewhere.

Moreover, we need to keep using OneOrMore for the current valid definition of leading_trivia and ZeroOrMore is unused but might be as part of #1020; I'm happy to remove it as part of this PR per YAGNI.

@Xanewok
Copy link
Contributor Author

Xanewok commented Jun 22, 2024

Thanks a lot for the reviews @OmarTawfik and for bearing with me over all of these issues/PRs along the way 😅 🙏

@Xanewok Xanewok added this pull request to the merge queue Jun 22, 2024
Merged via the queue into NomicFoundation:main with commit 0a2b0d4 Jun 22, 2024
3 of 5 checks passed
@Xanewok Xanewok deleted the wrap-up-parser-dslv2-migration branch June 22, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate the parser to the language definition v2
2 participants