diff options
Diffstat (limited to 'src/syntactic_token.rs')
-rw-r--r-- | src/syntactic_token.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/syntactic_token.rs b/src/syntactic_token.rs index ee473e2..4a50e8a 100644 --- a/src/syntactic_token.rs +++ b/src/syntactic_token.rs @@ -5,16 +5,18 @@ pub enum SyntacticTokenType { LabelDefinition(String), MacroDefinition(String), - MacroTerminator, + MacroDefinitionTerminator, - Pad(u16), - Byte(u8), - Short(u16), + Padding(u16), + ByteLiteral(u8), + ShortLiteral(u16), Instruction(u8), Comment, } + + pub struct SyntacticToken { pub r#type: SyntacticTokenType, pub source_location: SourceLocation, @@ -32,12 +34,10 @@ impl SyntacticToken { _ => (), }; } - pub fn set_error(&mut self, error: Error) { self.error = Some(error); } - pub fn is_macro_terminator(&self) -> bool { - if let SyntacticTokenType::MacroTerminator = self.r#type {true} else {false} + if let SyntacticTokenType::MacroDefinitionTerminator = self.r#type {true} else {false} } } |