mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Merge branch 'main' into redsun82/rust-expand-attr-macros
This commit is contained in:
@@ -23,6 +23,7 @@ fn class_name(type_name: &str) -> String {
|
||||
"Literal" => "LiteralExpr".to_owned(),
|
||||
"ArrayExpr" => "ArrayExprInternal".to_owned(),
|
||||
"AsmOptions" => "AsmOptionsList".to_owned(),
|
||||
"MacroStmts" => "MacroBlockExpr".to_owned(),
|
||||
_ if type_name.starts_with("Record") => type_name.replacen("Record", "Struct", 1),
|
||||
_ if type_name.ends_with("Type") => format!("{}Repr", type_name),
|
||||
_ => type_name.to_owned(),
|
||||
@@ -36,6 +37,7 @@ fn property_name(type_name: &str, field_name: &str) -> String {
|
||||
("MatchExpr", "expr") => "scrutinee",
|
||||
("Variant", "expr") => "discriminant",
|
||||
("FieldExpr", "expr") => "container",
|
||||
("MacroBlockExpr", "expr") => "tail_expr",
|
||||
(_, "name_ref") => "identifier",
|
||||
(_, "then_branch") => "then",
|
||||
(_, "else_branch") => "else_",
|
||||
|
||||
Reference in New Issue
Block a user