reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
163 CurPtr = CurBuf.begin(); 167 char CurChar = *CurPtr++; 173 if (CurPtr-1 != CurBuf.end()) 177 --CurPtr; // Another call to lex will return EOF again. 184 TokStart = CurPtr; 208 if (const char *Ptr = isLabelTail(CurPtr)) { 209 CurPtr = Ptr; 210 StrVal.assign(TokStart, CurPtr-1); 213 if (CurPtr[0] == '.' && CurPtr[1] == '.') { 213 if (CurPtr[0] == '.' && CurPtr[1] == '.') { 214 CurPtr += 2; 249 if (CurPtr[0] == '\n' || CurPtr[0] == '\r' || getNextChar() == EOF) 249 if (CurPtr[0] == '\n' || CurPtr[0] == '\r' || getNextChar() == EOF) 264 CurPtr = Ptr; 265 StrVal.assign(TokStart, CurPtr - 1); 270 if (CurPtr[0] == '"') { 271 ++CurPtr; 281 StrVal.assign(TokStart + 2, CurPtr - 1); 301 const char *Start = CurPtr; 310 StrVal.assign(Start, CurPtr-1); 319 const char *NameStart = CurPtr; 320 if (isalpha(static_cast<unsigned char>(CurPtr[0])) || 321 CurPtr[0] == '-' || CurPtr[0] == '$' || 321 CurPtr[0] == '-' || CurPtr[0] == '$' || 322 CurPtr[0] == '.' || CurPtr[0] == '_') { 322 CurPtr[0] == '.' || CurPtr[0] == '_') { 323 ++CurPtr; 324 while (isalnum(static_cast<unsigned char>(CurPtr[0])) || 325 CurPtr[0] == '-' || CurPtr[0] == '$' || 325 CurPtr[0] == '-' || CurPtr[0] == '$' || 326 CurPtr[0] == '.' || CurPtr[0] == '_') 326 CurPtr[0] == '.' || CurPtr[0] == '_') 327 ++CurPtr; 329 StrVal.assign(NameStart, CurPtr); 338 if (!isdigit(static_cast<unsigned char>(CurPtr[0]))) 341 for (++CurPtr; isdigit(static_cast<unsigned char>(CurPtr[0])); ++CurPtr) 341 for (++CurPtr; isdigit(static_cast<unsigned char>(CurPtr[0])); ++CurPtr) 341 for (++CurPtr; isdigit(static_cast<unsigned char>(CurPtr[0])); ++CurPtr) 344 uint64_t Val = atoull(TokStart + 1, CurPtr); 353 if (CurPtr[0] == '"') { 354 ++CurPtr; 364 StrVal.assign(TokStart+2, CurPtr-1); 399 if (CurPtr[0] == ':') { 400 ++CurPtr; 417 if (isalpha(static_cast<unsigned char>(CurPtr[0])) || 418 CurPtr[0] == '-' || CurPtr[0] == '$' || 418 CurPtr[0] == '-' || CurPtr[0] == '$' || 419 CurPtr[0] == '.' || CurPtr[0] == '_' || CurPtr[0] == '\\') { 419 CurPtr[0] == '.' || CurPtr[0] == '_' || CurPtr[0] == '\\') { 419 CurPtr[0] == '.' || CurPtr[0] == '_' || CurPtr[0] == '\\') { 420 ++CurPtr; 421 while (isalnum(static_cast<unsigned char>(CurPtr[0])) || 422 CurPtr[0] == '-' || CurPtr[0] == '$' || 422 CurPtr[0] == '-' || CurPtr[0] == '$' || 423 CurPtr[0] == '.' || CurPtr[0] == '_' || CurPtr[0] == '\\') 423 CurPtr[0] == '.' || CurPtr[0] == '_' || CurPtr[0] == '\\') 423 CurPtr[0] == '.' || CurPtr[0] == '_' || CurPtr[0] == '\\') 424 ++CurPtr; 426 StrVal.assign(TokStart+1, CurPtr); // Skip ! 453 const char *StartChar = CurPtr; 454 const char *IntEnd = CurPtr[-1] == 'i' ? nullptr : StartChar; 457 for (; isLabelChar(*CurPtr); ++CurPtr) { 457 for (; isLabelChar(*CurPtr); ++CurPtr) { 459 if (!IntEnd && !isdigit(static_cast<unsigned char>(*CurPtr))) 460 IntEnd = CurPtr; 461 if (!KeywordEnd && !isalnum(static_cast<unsigned char>(*CurPtr)) && 462 *CurPtr != '_') 463 KeywordEnd = CurPtr; 468 if (!IgnoreColonInIdentifiers && *CurPtr == ':') { 469 StrVal.assign(StartChar-1, CurPtr++); 475 if (!IntEnd) IntEnd = CurPtr; 477 CurPtr = IntEnd; 478 uint64_t NumBits = atoull(StartChar, CurPtr); 489 if (!KeywordEnd) KeywordEnd = CurPtr; 490 CurPtr = KeywordEnd; 492 StringRef Keyword(StartChar, CurPtr - StartChar); 947 int len = CurPtr-TokStart-3; 952 CurPtr = TokStart+3; 965 CurPtr = TokStart+2; 970 CurPtr = TokStart+1; 982 CurPtr = TokStart + 2; 985 if ((CurPtr[0] >= 'K' && CurPtr[0] <= 'M') || CurPtr[0] == 'H') { 985 if ((CurPtr[0] >= 'K' && CurPtr[0] <= 'M') || CurPtr[0] == 'H') { 985 if ((CurPtr[0] >= 'K' && CurPtr[0] <= 'M') || CurPtr[0] == 'H') { 986 Kind = *CurPtr++; 991 if (!isxdigit(static_cast<unsigned char>(CurPtr[0]))) { 993 CurPtr = TokStart+1; 997 while (isxdigit(static_cast<unsigned char>(CurPtr[0]))) 998 ++CurPtr; 1005 APInt(64, HexIntToVal(TokStart + 2, CurPtr))); 1014 FP80HexToIntPair(TokStart+3, CurPtr, Pair); 1019 HexToIntPair(TokStart+3, CurPtr, Pair); 1024 HexToIntPair(TokStart+3, CurPtr, Pair); 1029 APInt(16,HexIntToVal(TokStart+3, CurPtr))); 1046 !isdigit(static_cast<unsigned char>(CurPtr[0]))) { 1048 if (const char *End = isLabelTail(CurPtr)) { 1050 CurPtr = End; 1060 for (; isdigit(static_cast<unsigned char>(CurPtr[0])); ++CurPtr) 1060 for (; isdigit(static_cast<unsigned char>(CurPtr[0])); ++CurPtr) 1064 if (isdigit(TokStart[0]) && CurPtr[0] == ':') { 1065 uint64_t Val = atoull(TokStart, CurPtr); 1066 ++CurPtr; // Skip the colon. 1074 if (isLabelChar(CurPtr[0]) || CurPtr[0] == ':') { 1074 if (isLabelChar(CurPtr[0]) || CurPtr[0] == ':') { 1075 if (const char *End = isLabelTail(CurPtr)) { 1077 CurPtr = End; 1084 if (CurPtr[0] != '.') { 1087 APSIntVal = APSInt(StringRef(TokStart, CurPtr - TokStart)); 1091 ++CurPtr; 1094 while (isdigit(static_cast<unsigned char>(CurPtr[0]))) ++CurPtr; 1094 while (isdigit(static_cast<unsigned char>(CurPtr[0]))) ++CurPtr; 1096 if (CurPtr[0] == 'e' || CurPtr[0] == 'E') { 1096 if (CurPtr[0] == 'e' || CurPtr[0] == 'E') { 1097 if (isdigit(static_cast<unsigned char>(CurPtr[1])) || 1098 ((CurPtr[1] == '-' || CurPtr[1] == '+') && 1098 ((CurPtr[1] == '-' || CurPtr[1] == '+') && 1099 isdigit(static_cast<unsigned char>(CurPtr[2])))) { 1100 CurPtr += 2; 1101 while (isdigit(static_cast<unsigned char>(CurPtr[0]))) ++CurPtr; 1101 while (isdigit(static_cast<unsigned char>(CurPtr[0]))) ++CurPtr; 1106 StringRef(TokStart, CurPtr - TokStart)); 1115 if (!isdigit(static_cast<unsigned char>(CurPtr[0]))) 1119 for (++CurPtr; isdigit(static_cast<unsigned char>(CurPtr[0])); ++CurPtr) 1119 for (++CurPtr; isdigit(static_cast<unsigned char>(CurPtr[0])); ++CurPtr) 1119 for (++CurPtr; isdigit(static_cast<unsigned char>(CurPtr[0])); ++CurPtr) 1123 if (CurPtr[0] != '.') { 1124 CurPtr = TokStart+1; 1128 ++CurPtr; 1131 while (isdigit(static_cast<unsigned char>(CurPtr[0]))) ++CurPtr; 1131 while (isdigit(static_cast<unsigned char>(CurPtr[0]))) ++CurPtr; 1133 if (CurPtr[0] == 'e' || CurPtr[0] == 'E') { 1133 if (CurPtr[0] == 'e' || CurPtr[0] == 'E') { 1134 if (isdigit(static_cast<unsigned char>(CurPtr[1])) || 1135 ((CurPtr[1] == '-' || CurPtr[1] == '+') && 1135 ((CurPtr[1] == '-' || CurPtr[1] == '+') && 1136 isdigit(static_cast<unsigned char>(CurPtr[2])))) { 1137 CurPtr += 2; 1138 while (isdigit(static_cast<unsigned char>(CurPtr[0]))) ++CurPtr; 1138 while (isdigit(static_cast<unsigned char>(CurPtr[0]))) ++CurPtr; 1143 StringRef(TokStart, CurPtr - TokStart));