use crate::*; pub enum SemanticTokenType { LabelReference(usize), MacroReference(usize), LabelDefinition(LabelDefinition), MacroDefinition(MacroDefinition), Pad(u16), Byte(u8), Short(u16), Instruction(u8), MacroTerminator, Comment, Error(SyntacticTokenType, Error), } pub struct SemanticToken { pub r#type: SemanticTokenType, pub source_location: SourceLocation, pub bytecode_location: BytecodeLocation, } pub struct LabelDefinition { pub name: String, pub address: u16, /// A list of pointers to label reference tokens pub references: Vec, } pub struct MacroDefinition { pub name: String, pub body_tokens: Vec, /// A list of pointers to macro reference tokens pub references: Vec, }