Skip to content

Commit c13e173

Browse files
committed
Rust: fix codegeneration for AsmOptions
1 parent 93972fc commit c13e173

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

rust/ast-generator/rust.ungram

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ AsmClobberAbi = 'clobber_abi' '(' ('@string' (',' '@string')* ','?) ')'
414414
// option := "pure" / "nomem" / "readonly" / "preserves_flags" / "noreturn" / "nostack" / "att_syntax" / "raw"
415415
AsmOption = 'pure' | 'nomem' | 'readonly' | 'preserves_flags' | 'noreturn' | 'nostack' | 'att_syntax' | 'raw' | 'may_unwind'
416416
// options := "options(" option *("," option) [","] ")"
417-
AsmOptions = 'options' '(' AsmOption *(',' AsmOption) ','? ')'
417+
AsmOptions = 'options' '(' (AsmOption (',' AsmOption)* ','?) ')'
418418
AsmLabel = 'label' BlockExpr
419419
AsmSym = 'sym' Path
420420
AsmConst = 'const' Expr

rust/ast-generator/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ fn class_name(type_name: &str) -> String {
2121
"Fn" => "Function".to_owned(),
2222
"Literal" => "LiteralExpr".to_owned(),
2323
"ArrayExpr" => "ArrayExprInternal".to_owned(),
24+
"AsmOptions" => "AsmOptionsList".to_owned(),
2425
_ if type_name.ends_with("Type") => format!("{}Repr", type_name),
2526
_ => type_name.to_owned(),
2627
}

0 commit comments

Comments
 (0)