assembler: great leap forwards (more like the Cultural Revolution)

This commit is contained in:
2025-06-25 03:26:50 +01:00
parent ce76820b6d
commit 9232f2ccab
10 changed files with 172 additions and 1 deletions
+17
View File
@@ -0,0 +1,17 @@
//! Contains [`TokenType`] and [`Token`]'s. Adapted from Harry's old lexer since it was
//! easier to build from scratch and edit his code than it would be to try and wrangle it
//! into shape.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum TokenType {
Symbol(Symbol),
Register(Register),
Immediate(u32),
StringLit(String),
Opcode(Opcode),
}
pub struct Token {
token_type: TokenType,
source_info: SourceInfo,
}