Rust: fix codegeneration for AsmOptions

This commit is contained in:
Arthur Baars
2024-12-16 15:21:13 +01:00
parent 93972fcb2e
commit c13e173681
2 changed files with 2 additions and 1 deletions

View File

@@ -414,7 +414,7 @@ AsmClobberAbi = 'clobber_abi' '(' ('@string' (',' '@string')* ','?) ')'
// option := "pure" / "nomem" / "readonly" / "preserves_flags" / "noreturn" / "nostack" / "att_syntax" / "raw"
AsmOption = 'pure' | 'nomem' | 'readonly' | 'preserves_flags' | 'noreturn' | 'nostack' | 'att_syntax' | 'raw' | 'may_unwind'
// options := "options(" option *("," option) [","] ")"
AsmOptions = 'options' '(' AsmOption *(',' AsmOption) ','? ')'
AsmOptions = 'options' '(' (AsmOption (',' AsmOption)* ','?) ')'
AsmLabel = 'label' BlockExpr
AsmSym = 'sym' Path
AsmConst = 'const' Expr

View File

@@ -21,6 +21,7 @@ fn class_name(type_name: &str) -> String {
"Fn" => "Function".to_owned(),
"Literal" => "LiteralExpr".to_owned(),
"ArrayExpr" => "ArrayExprInternal".to_owned(),
"AsmOptions" => "AsmOptionsList".to_owned(),
_ if type_name.ends_with("Type") => format!("{}Repr", type_name),
_ => type_name.to_owned(),
}