Lines Matching refs:CurPtr
152 static const char *isLabelTail(const char *CurPtr) {
154 if (CurPtr[0] == ':') return CurPtr+1;
155 if (!isLabelChar(CurPtr[0])) return nullptr;
156 ++CurPtr;
169 CurPtr = CurBuf.begin();
173 char CurChar = *CurPtr++;
179 if (CurPtr-1 != CurBuf.end())
183 --CurPtr; // Another call to lex will return EOF again.
190 TokStart = CurPtr;
214 if (const char *Ptr = isLabelTail(CurPtr)) {
215 CurPtr = Ptr;
216 StrVal.assign(TokStart, CurPtr-1);
219 if (CurPtr[0] == '.' && CurPtr[1] == '.') {
220 CurPtr += 2;
250 if (CurPtr[0] == '\n' || CurPtr[0] == '\r' || getNextChar() == EOF)
265 CurPtr = Ptr;
266 StrVal.assign(TokStart, CurPtr - 1);
271 if (CurPtr[0] == '"') {
272 ++CurPtr;
282 StrVal.assign(TokStart + 2, CurPtr - 1);
302 const char *Start = CurPtr;
311 StrVal.assign(Start, CurPtr-1);
320 const char *NameStart = CurPtr;
321 if (isalpha(static_cast<unsigned char>(CurPtr[0])) ||
322 CurPtr[0] == '-' || CurPtr[0] == '$' ||
323 CurPtr[0] == '.' || CurPtr[0] == '_') {
324 ++CurPtr;
325 while (isalnum(static_cast<unsigned char>(CurPtr[0])) ||
326 CurPtr[0] == '-' || CurPtr[0] == '$' ||
327 CurPtr[0] == '.' || CurPtr[0] == '_')
328 ++CurPtr;
330 StrVal.assign(NameStart, CurPtr);
338 if (CurPtr[0] == '"') {
339 ++CurPtr;
349 StrVal.assign(TokStart+2, CurPtr-1);
365 if (isdigit(static_cast<unsigned char>(CurPtr[0]))) {
366 for (++CurPtr; isdigit(static_cast<unsigned char>(CurPtr[0])); ++CurPtr)
369 uint64_t Val = atoull(TokStart+1, CurPtr);
394 if (CurPtr[0] == ':') {
395 ++CurPtr;
412 if (isalpha(static_cast<unsigned char>(CurPtr[0])) ||
413 CurPtr[0] == '-' || CurPtr[0] == '$' ||
414 CurPtr[0] == '.' || CurPtr[0] == '_' || CurPtr[0] == '\\') {
415 ++CurPtr;
416 while (isalnum(static_cast<unsigned char>(CurPtr[0])) ||
417 CurPtr[0] == '-' || CurPtr[0] == '$' ||
418 CurPtr[0] == '.' || CurPtr[0] == '_' || CurPtr[0] == '\\')
419 ++CurPtr;
421 StrVal.assign(TokStart+1, CurPtr); // Skip !
432 if (isdigit(static_cast<unsigned char>(CurPtr[0]))) {
433 for (++CurPtr; isdigit(static_cast<unsigned char>(CurPtr[0])); ++CurPtr)
436 uint64_t Val = atoull(TokStart+1, CurPtr);
452 const char *StartChar = CurPtr;
453 const char *IntEnd = CurPtr[-1] == 'i' ? nullptr : StartChar;
456 for (; isLabelChar(*CurPtr); ++CurPtr) {
458 if (!IntEnd && !isdigit(static_cast<unsigned char>(*CurPtr)))
459 IntEnd = CurPtr;
460 if (!KeywordEnd && !isalnum(static_cast<unsigned char>(*CurPtr)) &&
461 *CurPtr != '_')
462 KeywordEnd = CurPtr;
466 if (*CurPtr == ':') {
467 StrVal.assign(StartChar-1, CurPtr++);
473 if (!IntEnd) IntEnd = CurPtr;
475 CurPtr = IntEnd;
476 uint64_t NumBits = atoull(StartChar, CurPtr);
487 if (!KeywordEnd) KeywordEnd = CurPtr;
488 CurPtr = KeywordEnd;
490 StringRef Keyword(StartChar, CurPtr - StartChar);
797 int len = CurPtr-TokStart-3;
802 CurPtr = TokStart+3;
815 CurPtr = TokStart+2;
820 CurPtr = TokStart+1;
832 CurPtr = TokStart + 2;
835 if ((CurPtr[0] >= 'K' && CurPtr[0] <= 'M') || CurPtr[0] == 'H') {
836 Kind = *CurPtr++;
841 if (!isxdigit(static_cast<unsigned char>(CurPtr[0]))) {
843 CurPtr = TokStart+1;
847 while (isxdigit(static_cast<unsigned char>(CurPtr[0])))
848 ++CurPtr;
854 APFloatVal = APFloat(BitsToDouble(HexIntToVal(TokStart+2, CurPtr)));
863 FP80HexToIntPair(TokStart+3, CurPtr, Pair);
868 HexToIntPair(TokStart+3, CurPtr, Pair);
873 HexToIntPair(TokStart+3, CurPtr, Pair);
878 APInt(16,HexIntToVal(TokStart+3, CurPtr)));
895 !isdigit(static_cast<unsigned char>(CurPtr[0]))) {
897 if (const char *End = isLabelTail(CurPtr)) {
899 CurPtr = End;
909 for (; isdigit(static_cast<unsigned char>(CurPtr[0])); ++CurPtr)
913 if (isLabelChar(CurPtr[0]) || CurPtr[0] == ':') {
914 if (const char *End = isLabelTail(CurPtr)) {
916 CurPtr = End;
923 if (CurPtr[0] != '.') {
926 APSIntVal = APSInt(StringRef(TokStart, CurPtr - TokStart));
930 ++CurPtr;
933 while (isdigit(static_cast<unsigned char>(CurPtr[0]))) ++CurPtr;
935 if (CurPtr[0] == 'e' || CurPtr[0] == 'E') {
936 if (isdigit(static_cast<unsigned char>(CurPtr[1])) ||
937 ((CurPtr[1] == '-' || CurPtr[1] == '+') &&
938 isdigit(static_cast<unsigned char>(CurPtr[2])))) {
939 CurPtr += 2;
940 while (isdigit(static_cast<unsigned char>(CurPtr[0]))) ++CurPtr;
953 if (!isdigit(static_cast<unsigned char>(CurPtr[0])))
957 for (++CurPtr; isdigit(static_cast<unsigned char>(CurPtr[0])); ++CurPtr)
961 if (CurPtr[0] != '.') {
962 CurPtr = TokStart+1;
966 ++CurPtr;
969 while (isdigit(static_cast<unsigned char>(CurPtr[0]))) ++CurPtr;
971 if (CurPtr[0] == 'e' || CurPtr[0] == 'E') {
972 if (isdigit(static_cast<unsigned char>(CurPtr[1])) ||
973 ((CurPtr[1] == '-' || CurPtr[1] == '+') &&
974 isdigit(static_cast<unsigned char>(CurPtr[2])))) {
975 CurPtr += 2;
976 while (isdigit(static_cast<unsigned char>(CurPtr[0]))) ++CurPtr;