assembler: great leap forwards (more like the Cultural Revolution)
This commit is contained in:
@@ -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,
|
||||
}
|
||||
Reference in New Issue
Block a user