1
Fork 0

Add asm label support to AST and HIR

This commit is contained in:
Gary Guo 2023-12-25 20:53:01 +00:00
parent 8f359beca4
commit 93fa8579c6
25 changed files with 143 additions and 21 deletions

View file

@ -166,6 +166,9 @@ pub fn parse_asm_args<'a>(
path: path.clone(),
};
ast::InlineAsmOperand::Sym { sym }
} else if !is_global_asm && p.eat_keyword(sym::label) {
let block = p.parse_block()?;
ast::InlineAsmOperand::Label { block }
} else if allow_templates {
let template = p.parse_expr()?;
// If it can't possibly expand to a string, provide diagnostics here to include other