Merge branch 'main' into redsun82/cargo-upgrade-3

This commit is contained in:
Paolo Tranquilli
2025-06-23 12:26:15 +02:00
209 changed files with 33325 additions and 14775 deletions

View File

@@ -385,8 +385,8 @@ struct ExtractorInfo {
}
fn enum_to_extractor_info(node: &AstEnumSrc) -> Option<ExtractorEnumInfo> {
if node.name == "VariantDef" {
// currently defined but unused
if node.name == "Adt" {
// no fields have `Adt` type, so we don't need extraction for it
return None;
}
Some(ExtractorEnumInfo {
@@ -484,8 +484,8 @@ fn main() -> anyhow::Result<()> {
.parse()
.expect("Failed to parse grammar");
let mut grammar = codegen::grammar::lower(&grammar);
grammar.enums.retain(|x| x.name != "Adt");
// remove the VariantDef enum, there is no use for it at the moment
grammar.enums.retain(|e| e.name != "VariantDef");
// we flatten TypeAnchor into PathSegment in the extractor
grammar.nodes.retain(|x| x.name != "TypeAnchor");