reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/MC/MCParser/AsmLexer.cpp
   47   TokStart = nullptr;
   87                   StringRef(TokStart, CurPtr - TokStart));
   87                   StringRef(TokStart, CurPtr - TokStart));
  113     return ReturnError(TokStart, "invalid hexadecimal floating-point constant: "
  118     return ReturnError(TokStart, "invalid hexadecimal floating-point constant: "
  131     return ReturnError(TokStart, "invalid hexadecimal floating-point constant: "
  134   return AsmToken(AsmToken::Real, StringRef(TokStart, CurPtr - TokStart));
  134   return AsmToken(AsmToken::Real, StringRef(TokStart, CurPtr - TokStart));
  159   if (CurPtr == TokStart+1 && TokStart[0] == '.')
  159   if (CurPtr == TokStart+1 && TokStart[0] == '.')
  160     return AsmToken(AsmToken::Dot, StringRef(TokStart, 1));
  162   return AsmToken(AsmToken::Identifier, StringRef(TokStart, CurPtr - TokStart));
  162   return AsmToken(AsmToken::Identifier, StringRef(TokStart, CurPtr - TokStart));
  177     return AsmToken(AsmToken::Slash, StringRef(TokStart, 1));
  197                       StringRef(TokStart, CurPtr - TokStart));
  197                       StringRef(TokStart, CurPtr - TokStart));
  200   return ReturnError(TokStart, "unterminated comment");
  228                     StringRef(TokStart, CurPtr - TokStart));
  228                     StringRef(TokStart, CurPtr - TokStart));
  232                   StringRef(TokStart, CurPtr - 1 - TokStart));
  232                   StringRef(TokStart, CurPtr - 1 - TokStart));
  309       StringRef Result(TokStart, CurPtr - TokStart);
  309       StringRef Result(TokStart, CurPtr - TokStart);
  313         return ReturnError(TokStart, Radix == 2 ? "invalid binary number" :
  337     StringRef Result(TokStart, CurPtr - TokStart);
  337     StringRef Result(TokStart, CurPtr - TokStart);
  341       return ReturnError(TokStart, !isHex ? "invalid decimal number" :
  360       StringRef Result(TokStart, CurPtr - TokStart);
  360       StringRef Result(TokStart, CurPtr - TokStart);
  369       return ReturnError(TokStart, "invalid binary number");
  371     StringRef Result(TokStart, CurPtr - TokStart);
  371     StringRef Result(TokStart, CurPtr - TokStart);
  375       return ReturnError(TokStart, "invalid binary number");
  400     if (StringRef(TokStart, CurPtr - TokStart).getAsInteger(0, Result))
  400     if (StringRef(TokStart, CurPtr - TokStart).getAsInteger(0, Result))
  401       return ReturnError(TokStart, "invalid hexadecimal number");
  411     return intToken(StringRef(TokStart, CurPtr - TokStart), Result);
  411     return intToken(StringRef(TokStart, CurPtr - TokStart), Result);
  418   StringRef Result(TokStart, CurPtr - TokStart);
  418   StringRef Result(TokStart, CurPtr - TokStart);
  420     return ReturnError(TokStart, !isHex ? "invalid octal number" :
  442     return ReturnError(TokStart, "unterminated single quote");
  447     return ReturnError(TokStart, "single quote way too long");
  451   StringRef Res = StringRef(TokStart,CurPtr - TokStart);
  451   StringRef Res = StringRef(TokStart,CurPtr - TokStart);
  464     Value = TokStart[1];
  480       return ReturnError(TokStart, "unterminated string constant");
  485   return AsmToken(AsmToken::String, StringRef(TokStart, CurPtr - TokStart));
  485   return AsmToken(AsmToken::String, StringRef(TokStart, CurPtr - TokStart));
  489   TokStart = CurPtr;
  496   return StringRef(TokStart, CurPtr-TokStart);
  496   return StringRef(TokStart, CurPtr-TokStart);
  500   TokStart = CurPtr;
  505   return StringRef(TokStart, CurPtr-TokStart);
  505   return StringRef(TokStart, CurPtr-TokStart);
  510   SaveAndRestore<const char *> SavedTokenStart(TokStart);
  552   TokStart = CurPtr;
  565       CurPtr = TokStart; // reset curPtr;
  574   if (isAtStartOfComment(TokStart))
  577   if (isAtStatementSeparator(TokStart)) {
  582                     StringRef(TokStart, strlen(MAI.getSeparatorString())));
  590     return AsmToken(AsmToken::EndOfStatement, StringRef(TokStart, 1));
  602     return ReturnError(TokStart, "invalid character in input");
  606     return AsmToken(AsmToken::Eof, StringRef(TokStart, 0));
  616       return AsmToken(AsmToken::Space, StringRef(TokStart, CurPtr - TokStart));
  616       return AsmToken(AsmToken::Space, StringRef(TokStart, CurPtr - TokStart));
  624                     StringRef(TokStart, CurPtr - TokStart));
  624                     StringRef(TokStart, CurPtr - TokStart));
  629     return AsmToken(AsmToken::EndOfStatement, StringRef(TokStart, 1));
  630   case ':': return AsmToken(AsmToken::Colon, StringRef(TokStart, 1));
  631   case '+': return AsmToken(AsmToken::Plus, StringRef(TokStart, 1));
  632   case '~': return AsmToken(AsmToken::Tilde, StringRef(TokStart, 1));
  633   case '(': return AsmToken(AsmToken::LParen, StringRef(TokStart, 1));
  634   case ')': return AsmToken(AsmToken::RParen, StringRef(TokStart, 1));
  635   case '[': return AsmToken(AsmToken::LBrac, StringRef(TokStart, 1));
  636   case ']': return AsmToken(AsmToken::RBrac, StringRef(TokStart, 1));
  637   case '{': return AsmToken(AsmToken::LCurly, StringRef(TokStart, 1));
  638   case '}': return AsmToken(AsmToken::RCurly, StringRef(TokStart, 1));
  639   case '*': return AsmToken(AsmToken::Star, StringRef(TokStart, 1));
  640   case ',': return AsmToken(AsmToken::Comma, StringRef(TokStart, 1));
  641   case '$': return AsmToken(AsmToken::Dollar, StringRef(TokStart, 1));
  642   case '@': return AsmToken(AsmToken::At, StringRef(TokStart, 1));
  643   case '\\': return AsmToken(AsmToken::BackSlash, StringRef(TokStart, 1));
  647       return AsmToken(AsmToken::EqualEqual, StringRef(TokStart, 2));
  649     return AsmToken(AsmToken::Equal, StringRef(TokStart, 1));
  653       return AsmToken(AsmToken::MinusGreater, StringRef(TokStart, 2));
  655     return AsmToken(AsmToken::Minus, StringRef(TokStart, 1));
  659       return AsmToken(AsmToken::PipePipe, StringRef(TokStart, 2));
  661     return AsmToken(AsmToken::Pipe, StringRef(TokStart, 1));
  662   case '^': return AsmToken(AsmToken::Caret, StringRef(TokStart, 1));
  666       return AsmToken(AsmToken::AmpAmp, StringRef(TokStart, 2));
  668     return AsmToken(AsmToken::Amp, StringRef(TokStart, 1));
  672       return AsmToken(AsmToken::ExclaimEqual, StringRef(TokStart, 2));
  674     return AsmToken(AsmToken::Exclaim, StringRef(TokStart, 1));
  711         return AsmToken(Operator, StringRef(TokStart, OperatorLength));
  714     return AsmToken(AsmToken::Percent, StringRef(TokStart, 1));
  718   case '#': return AsmToken(AsmToken::Hash, StringRef(TokStart, 1));
  728       return AsmToken(AsmToken::LessLess, StringRef(TokStart, 2));
  731       return AsmToken(AsmToken::LessEqual, StringRef(TokStart, 2));
  734       return AsmToken(AsmToken::LessGreater, StringRef(TokStart, 2));
  736       return AsmToken(AsmToken::Less, StringRef(TokStart, 1));
  742       return AsmToken(AsmToken::GreaterGreater, StringRef(TokStart, 2));
  745       return AsmToken(AsmToken::GreaterEqual, StringRef(TokStart, 2));
  747       return AsmToken(AsmToken::Greater, StringRef(TokStart, 1));
lib/MC/MCParser/MCAsmLexer.cpp
   24   return SMLoc::getFromPointer(TokStart);