mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge branch 'main' into redsun82/cargo-upgrade-3
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user