mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Added AsmToken enum constants to MCAsmLexer.h for '[', ']', '{', and '}' in
preparation of supporting other targets. Then changed the lexer to parse these as tokens. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81050 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9823ca971d
commit
fb0f0dedd7
@ -37,7 +37,7 @@ struct AsmToken {
|
||||
Colon,
|
||||
Plus, Minus, Tilde,
|
||||
Slash, // '/'
|
||||
LParen, RParen,
|
||||
LParen, RParen, LBrac, RBrac, LCurly, RCurly,
|
||||
Star, Comma, Dollar, Equal, EqualEqual,
|
||||
|
||||
Pipe, PipePipe, Caret,
|
||||
|
@ -277,6 +277,10 @@ AsmToken AsmLexer::LexToken() {
|
||||
case '~': return AsmToken(AsmToken::Tilde, StringRef(TokStart, 1));
|
||||
case '(': return AsmToken(AsmToken::LParen, StringRef(TokStart, 1));
|
||||
case ')': return AsmToken(AsmToken::RParen, StringRef(TokStart, 1));
|
||||
case '[': return AsmToken(AsmToken::LBrac, StringRef(TokStart, 1));
|
||||
case ']': return AsmToken(AsmToken::RBrac, StringRef(TokStart, 1));
|
||||
case '{': return AsmToken(AsmToken::LCurly, StringRef(TokStart, 1));
|
||||
case '}': return AsmToken(AsmToken::RCurly, StringRef(TokStart, 1));
|
||||
case '*': return AsmToken(AsmToken::Star, StringRef(TokStart, 1));
|
||||
case ',': return AsmToken(AsmToken::Comma, StringRef(TokStart, 1));
|
||||
case '$': return AsmToken(AsmToken::Dollar, StringRef(TokStart, 1));
|
||||
|
Loading…
Reference in New Issue
Block a user