assembler: begin wrangling

This commit is contained in:
2025-06-25 02:25:46 +01:00
parent f72f36cd47
commit ce76820b6d
19 changed files with 79 additions and 2884 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,
}