forked from OSchip/llvm-project
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
f92f9909c4
commit
9c0f7fc746
|
@ -37,7 +37,7 @@ struct AsmToken {
|
||||||
Colon,
|
Colon,
|
||||||
Plus, Minus, Tilde,
|
Plus, Minus, Tilde,
|
||||||
Slash, // '/'
|
Slash, // '/'
|
||||||
LParen, RParen,
|
LParen, RParen, LBrac, RBrac, LCurly, RCurly,
|
||||||
Star, Comma, Dollar, Equal, EqualEqual,
|
Star, Comma, Dollar, Equal, EqualEqual,
|
||||||
|
|
||||||
Pipe, PipePipe, Caret,
|
Pipe, PipePipe, Caret,
|
||||||
|
|
|
@ -277,6 +277,10 @@ AsmToken AsmLexer::LexToken() {
|
||||||
case '~': return AsmToken(AsmToken::Tilde, StringRef(TokStart, 1));
|
case '~': return AsmToken(AsmToken::Tilde, StringRef(TokStart, 1));
|
||||||
case '(': return AsmToken(AsmToken::LParen, StringRef(TokStart, 1));
|
case '(': return AsmToken(AsmToken::LParen, StringRef(TokStart, 1));
|
||||||
case ')': return AsmToken(AsmToken::RParen, 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::Star, StringRef(TokStart, 1));
|
||||||
case ',': return AsmToken(AsmToken::Comma, StringRef(TokStart, 1));
|
case ',': return AsmToken(AsmToken::Comma, StringRef(TokStart, 1));
|
||||||
case '$': return AsmToken(AsmToken::Dollar, StringRef(TokStart, 1));
|
case '$': return AsmToken(AsmToken::Dollar, StringRef(TokStart, 1));
|
||||||
|
|
Loading…
Reference in New Issue