Home | History | Annotate | Download | only in MCParser

Lines Matching refs:AsmToken

45 /// location.  This is defined to always return AsmToken::Error.
46 AsmToken AsmLexer::ReturnError(const char *Loc, const std::string &Msg) {
49 return AsmToken(AsmToken::Error, StringRef(Loc, 0));
74 AsmToken AsmLexer::LexFloatLiteral() {
90 return AsmToken(AsmToken::Real,
100 AsmToken AsmLexer::LexHexFloatLiteral(bool NoIntDigits) {
138 return AsmToken(AsmToken::Real, StringRef(TokStart, CurPtr - TokStart));
146 AsmToken AsmLexer::LexIdentifier() {
162 return AsmToken(AsmToken::Dot, StringRef(TokStart, 1));
164 return AsmToken(AsmToken::Identifier, StringRef(TokStart, CurPtr - TokStart));
169 AsmToken AsmLexer::LexSlash() {
173 default: return AsmToken(AsmToken::Slash, StringRef(CurPtr-1, 1));
195 AsmToken AsmLexer::LexLineComment() {
203 return AsmToken(AsmToken::Eof, StringRef(TokStart, 0));
204 return AsmToken(AsmToken::EndOfStatement, StringRef(TokStart, 0));
240 static AsmToken intToken(StringRef Ref, APInt &Value)
243 return AsmToken(AsmToken::Integer, Ref, Value);
244 return AsmToken(AsmToken::BigNum, Ref, Value);
254 AsmToken AsmLexer::LexDigit() {
289 return AsmToken(AsmToken::Integer, Result, 0);
363 AsmToken AsmLexer::LexSingleQuote() {
394 return AsmToken(AsmToken::Integer, Res, Value);
399 AsmToken AsmLexer::LexQuote() {
414 return AsmToken(AsmToken::String, StringRef(TokStart, CurPtr - TokStart));
439 const AsmToken AsmLexer::peekTok(bool ShouldSkipSpace) {
449 AsmToken Token = LexToken();
479 AsmToken AsmLexer::LexToken() {
489 return AsmToken(AsmToken::Hash, StringRef(TokStart, 1));
495 return AsmToken(AsmToken::EndOfStatement,
503 return AsmToken(AsmToken::EndOfStatement, StringRef(TokStart, 1));
515 case EOF: return AsmToken(AsmToken::Eof, StringRef(TokStart, 0));
528 return AsmToken(AsmToken::Space, StringRef(TokStart, len));
533 return AsmToken(AsmToken::EndOfStatement, StringRef(TokStart, 1));
534 case ':': return AsmToken(AsmToken::Colon, StringRef(TokStart, 1));
535 case '+': return AsmToken(AsmToken::Plus, StringRef(TokStart, 1));
536 case '-': return AsmToken(AsmToken::Minus, StringRef(TokStart, 1));
537 case '~': return AsmToken(AsmToken::Tilde, StringRef(TokStart, 1));
538 case '(': return AsmToken(AsmToken::LParen, StringRef(TokStart, 1));
539 case ')': return AsmToken(AsmToken::RParen, StringRef(TokStart, 1));
540 case '[': return AsmToken(AsmToken::LBrac, StringRef(TokStart, 1));
541 case ']': return AsmToken(AsmToken
542 case '{': return AsmToken(AsmToken::LCurly, StringRef(TokStart, 1));
543 case '}': return AsmToken(AsmToken::RCurly, StringRef(TokStart, 1));
544 case '*': return AsmToken(AsmToken::Star, StringRef(TokStart, 1));
545 case ',': return AsmToken(AsmToken::Comma, StringRef(TokStart, 1));
546 case '$': return AsmToken(AsmToken::Dollar, StringRef(TokStart, 1));
547 case '@': return AsmToken(AsmToken::At, StringRef(TokStart, 1));
548 case '\\': return AsmToken(AsmToken::BackSlash, StringRef(TokStart, 1));
551 return ++CurPtr, AsmToken(AsmToken::EqualEqual, StringRef(TokStart, 2));
552 return AsmToken(AsmToken::Equal, StringRef(TokStart, 1));
555 return ++CurPtr, AsmToken(AsmToken::PipePipe, StringRef(TokStart, 2));
556 return AsmToken(AsmToken::Pipe, StringRef(TokStart, 1));
557 case '^': return AsmToken(AsmToken::Caret, StringRef(TokStart, 1));
560 return ++CurPtr, AsmToken(AsmToken::AmpAmp, StringRef(TokStart, 2));
561 return AsmToken(AsmToken::Amp, StringRef(TokStart, 1));
564 return ++CurPtr, AsmToken(AsmToken::ExclaimEqual, StringRef(TokStart, 2));
565 return AsmToken(AsmToken::Exclaim, StringRef(TokStart, 1));
566 case '%': return AsmToken(AsmToken::Percent, StringRef(TokStart, 1));
568 case '#': return AsmToken(AsmToken::Hash, StringRef(TokStart, 1));
576 case '<': return ++CurPtr, AsmToken(AsmToken::LessLess,
578 case '=': return ++CurPtr, AsmToken(AsmToken::LessEqual,
580 case '>': return ++CurPtr, AsmToken(AsmToken::LessGreater,
582 default: return AsmToken(AsmToken::Less, StringRef(TokStart, 1));
586 case '>': return ++CurPtr, AsmToken(AsmToken::GreaterGreater,
588 case '=': return ++CurPtr, AsmToken(AsmToken::GreaterEqual,
590 default: return AsmToken(AsmToken::Greater, StringRef(TokStart, 1));