Skip to content

Commit 4af8f53

Browse files
committed
fix(parser/instruction): fix syntax display of pseudoinstructions
1 parent 5297658 commit 4af8f53

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/parser/instruction.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,14 @@ impl Instruction {
142142
}
143143
_ => return Err("the first field should have type `co`"),
144144
}
145-
}
145+
},
146146
// First token is an identifier => assume it's the instruction name
147147
// There is no opcode field specification => assume it shouldn't be included in the
148148
// output
149-
Some(Token::Identifier(_)) => vec![],
149+
Some(Token::Identifier(_)) => {
150+
syntax.push_str("opcode ");
151+
vec![]
152+
},
150153
_ => return Err("unexpected first token of signature definition"),
151154
})
152155
.boxed();

0 commit comments

Comments
 (0)