mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
Added a Register token to AsmToken and the appropriate
accessor method for its value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94241 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1caedd056d
commit
5d74e1f644
@ -33,6 +33,9 @@ public:
|
||||
// Integer values.
|
||||
Integer,
|
||||
|
||||
// Register values (stored in IntVal). Only used by TargetAsmLexer.
|
||||
Register,
|
||||
|
||||
// No-value.
|
||||
EndOfStatement,
|
||||
Colon,
|
||||
@ -96,6 +99,13 @@ public:
|
||||
assert(Kind == Integer && "This token isn't an integer!");
|
||||
return IntVal;
|
||||
}
|
||||
|
||||
/// getRegVal - Get the register number for the current token, which should
|
||||
/// be a register.
|
||||
unsigned getRegVal() const {
|
||||
assert(Kind == Register && "This token isn't a register!");
|
||||
return static_cast<unsigned>(IntVal);
|
||||
}
|
||||
};
|
||||
|
||||
/// MCAsmLexer - Generic assembler lexer interface, for use by target specific
|
||||
|
Loading…
x
Reference in New Issue
Block a user