Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/parser/src/grammar/expressions/atom.rs')
-rw-r--r--crates/parser/src/grammar/expressions/atom.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/parser/src/grammar/expressions/atom.rs b/crates/parser/src/grammar/expressions/atom.rs
index 5faf6fc275..8cc332d463 100644
--- a/crates/parser/src/grammar/expressions/atom.rs
+++ b/crates/parser/src/grammar/expressions/atom.rs
@@ -381,10 +381,14 @@ fn parse_asm_expr(p: &mut Parser<'_>, m: Marker) -> Option<CompletedMarker> {
op.complete(p, ASM_REG_OPERAND);
op_n.complete(p, ASM_OPERAND_NAMED);
} else if p.eat_contextual_kw(T![label]) {
+ // test asm_label
+ // fn foo() {
+ // builtin#asm("", label {});
+ // }
dir_spec.abandon(p);
block_expr(p);
- op.complete(p, ASM_OPERAND_NAMED);
- op_n.complete(p, ASM_LABEL);
+ op.complete(p, ASM_LABEL);
+ op_n.complete(p, ASM_OPERAND_NAMED);
} else if p.eat(T![const]) {
dir_spec.abandon(p);
expr(p);