assembler: use common to match registers
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user