mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 17:32:36 +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. llvm-svn: 81050
This commit is contained in:
parent
f697ad5e30
commit
8aeb8c1f8c
@ -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…
x
Reference in New Issue
Block a user