-
Notifications
You must be signed in to change notification settings - Fork 19
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
Collect syntax kinds
directly from DSL v2 and isolate parser generation logic
#991
Collect syntax kinds
directly from DSL v2 and isolate parser generation logic
#991
Conversation
This was not meant to be tackled in the follow-up refactor but is rather a possibly a low-hanging fruit in terms of performance.
This reverts commit 645b05f.
…tor" This reverts commit 117b9487e9d882b372b4944b024b32d90f8296d7.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few questions/suggestions.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left two comment threads unresolved as FYI. But not blocking. This looks great to merge as-is. Thanks!
Part of #638 Follow-up to #991 Pretty straightforward: instead of visiting the previously built v1 definition structure, we defer to `Language::collect_breaking_changes` as the definitions overlap - the breaking changes are defined as versions in which the syntax items may be evaluated differently, which means that these are exactly the versions that will be referenced for the conditional syntax item evaluation in the parser/lexer.
…Foundation#1002) Part of NomicFoundation#638 Follow-up to NomicFoundation#991 Pretty straightforward: instead of visiting the previously built v1 definition structure, we defer to `Language::collect_breaking_changes` as the definitions overlap - the breaking changes are defined as versions in which the syntax items may be evaluated differently, which means that these are exactly the versions that will be referenced for the conditional syntax item evaluation in the parser/lexer. Refactor `BuiltInLabel` to avoid duplication (NomicFoundation#992) Spin off of NomicFoundation#976 Moves the `BuiltInLabel` enum from the parser generator into the language definition and remove duplication in the `kinds` template. add wit generating wit and glue stub adaptors, wit feature flag glue macros remove wit_bindgen fix wit gen paths add wit-bindgen export the kinds pub export macro for wit improve export macro world => slang fully implement glue convert query matches refactor ffi glue macros refactor wit variant rather than enum back to enum
…Foundation#1002) Part of NomicFoundation#638 Follow-up to NomicFoundation#991 Pretty straightforward: instead of visiting the previously built v1 definition structure, we defer to `Language::collect_breaking_changes` as the definitions overlap - the breaking changes are defined as versions in which the syntax items may be evaluated differently, which means that these are exactly the versions that will be referenced for the conditional syntax item evaluation in the parser/lexer. Refactor `BuiltInLabel` to avoid duplication (NomicFoundation#992) Spin off of NomicFoundation#976 Moves the `BuiltInLabel` enum from the parser generator into the language definition and remove duplication in the `kinds` template. add wit generating wit and glue stub adaptors, wit feature flag glue macros remove wit_bindgen fix wit gen paths add wit-bindgen export the kinds pub export macro for wit improve export macro world => slang fully implement glue convert query matches refactor ffi glue macros refactor wit variant rather than enum back to enum
…Foundation#1002) Part of NomicFoundation#638 Follow-up to NomicFoundation#991 Pretty straightforward: instead of visiting the previously built v1 definition structure, we defer to `Language::collect_breaking_changes` as the definitions overlap - the breaking changes are defined as versions in which the syntax items may be evaluated differently, which means that these are exactly the versions that will be referenced for the conditional syntax item evaluation in the parser/lexer.
Work towards #638
Mainly:
quote
ing or any (old) parser codegen now in the newgenerator/src/parser/codegen
modulekinds.rs.jinja2
we use a new, dedicatedKindsModel
to disentangle, limiting the workarounds like removing the built-in labels only after visiting the grammarParserModel.referenced_versions
(it's de factoLanguage::collect_breaking_changes
but with a caveat; I'll submit a separate PR for that since it's not 100% obvious and would change how we defineParserModel
).pub(super)
visibility or updated referenced issues.Now, the remaining work will be to actually revamp how we visit the resulting grammar.