assembler: use common to match registers

This commit is contained in:
2025-06-25 19:29:56 +01:00
parent d9807b5b36
commit 68e459f32b
4 changed files with 46 additions and 28 deletions
+4 -2
View File
@@ -2,6 +2,8 @@
//! easier to build from scratch and edit his code than it would be to try and wrangle it
//! into shape.
use common::prelude::*;
use crate::source::{
source_info::SourceInfo,
token_info::{
@@ -71,8 +73,8 @@ impl Token {
}
#[must_use]
pub const fn register(name: String, source_info: SourceInfo) -> Self {
Self::new(TokenType::Register(RegisterToken { name }), source_info)
pub const fn register(reg: Register, source_info: SourceInfo) -> Self {
Self::new(TokenType::Register(RegisterToken { reg }), source_info)
}
#[must_use]