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:
Kevin Enderby 2009-09-04 22:40:31 +00:00
parent 9823ca971d
commit fb0f0dedd7
2 changed files with 5 additions and 1 deletions

View File

@ -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,

View File

@ -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));