Lines Matching full:current

290     return StringRef(Current, End - Current);
402 /// Consume a single b-break[28] if it's present at the current position.
404 /// Return false if the code unit at the current position isn't a line break.
414 /// Invalid simple keys are not on the current line or are further than 1024
431 /// Skip a single-line comment when the comment starts at the current
528 /// The current position of the scanner.
529 StringRef::iterator Current;
534 /// Current YAML indentation level in spaces.
537 /// Current column number in Unicode code points.
540 /// Current line number.
871 Current = InputBuffer.getBufferStart();
887 // If the current token is a possible simple key, keep parsing until we
1002 auto Final = skip_while(Func, Current);
1003 Column += Final - Current;
1004 Current = Final;
1013 if (Current == End)
1015 if (( *Current == '%'
1016 && Current + 2 < End
1017 && is_ns_hex_digit(*(Current + 1))
1018 && is_ns_hex_digit(*(Current + 2)))
1019 || is_ns_word_char(*Current)
1020 || StringRef(Current, 1).find_first_of("#;/?:@&=+$,_.!~*'()[]")
1022 ++Current;
1031 setError("Cannot consume non-ascii characters", Current);
1034 if (Current == End)
1036 if (uint8_t(*Current) >= 0x80) {
1037 setError("Cannot consume non-ascii characters", Current);
1040 if (uint8_t(*Current) == Expected) {
1041 ++Current;
1049 Current += Distance;
1051 assert(Current <= End && "Skipped past the end");
1078 auto Next = skip_b_break(Current);
1079 if (Next == Current)
1083 Current = Next;
1127 T.Range = StringRef(Current, 1);
1146 T.Range = StringRef(Current, 0);
1153 if (Current == End || *Current != '#')
1158 StringRef::iterator I = skip_nb_char(Current);
1159 if (I == Current)
1161 Current = I;
1168 while (Current != End && (*Current == ' ' || *Current == '\t')) {
1175 StringRef::iterator i = skip_b_break(Current);
1176 if (i == Current)
1178 Current = i;
1194 T.Range = StringRef(Current, EI.second);
1196 Current += EI.second;
1214 T.Range = StringRef(Current, 0);
1226 StringRef::iterator Start = Current;
1228 StringRef::iterator NameStart = Current;
1229 Current = skip_while(&Scanner::skip_ns_char, Current);
1230 StringRef Name(NameStart, Current - NameStart);
1231 Current = skip_while(&Scanner::skip_s_white, Current);
1235 Current = skip_while(&Scanner::skip_ns_char, Current);
1237 T.Range = StringRef(Start, Current - Start);
1241 Current = skip_while(&Scanner::skip_ns_char, Current);
1242 Current = skip_while(&Scanner::skip_s_white, Current);
1243 Current = skip_while(&Scanner::skip_ns_char, Current);
1245 T.Range = StringRef(Start, Current - Start);
1260 T.Range = StringRef(Current, 3);
1270 T.Range = StringRef(Current, 1);
1292 T.Range = StringRef(Current, 1);
1306 T.Range = StringRef(Current, 1);
1319 T.Range = StringRef(Current, 1);
1335 T.Range = StringRef(Current, 1);
1373 T.Range = StringRef(Current, 1);
1390 // We calculate the number of consecutive '\'s before the current position
1393 // (Position - 1 - I) now contains the number of '\'s before the current
1399 StringRef::iterator Start = Current;
1403 ++Current;
1404 while (Current != End && *Current != '"')
1405 ++Current;
1408 } while ( Current != End
1409 && *(Current - 1) == '\\'
1410 && wasEscaped(Start + 1, Current));
1413 while (Current != End) {
1415 if (Current + 1 < End && *Current == '\'' && *(Current + 1) == '\'') {
1418 } else if (*Current == '\'')
1420 StringRef::iterator i = skip_nb_char(Current);
1421 if (i == Current) {
1422 i = skip_b_break(Current);
1423 if (i == Current)
1425 Current = i;
1431 Current = i;
1437 if (Current == End) {
1438 setError("Expected quote at end of scalar", Current);
1445 T.Range = StringRef(Start, Current - Start);
1457 StringRef::iterator Start = Current;
1462 while (Current != End) {
1463 if (*Current == '#')
1466 while (Current != End &&
1467 ((*Current != ':' && isPlainSafeNonBlank(Current)) ||
1468 (*Current == ':' && isPlainSafeNonBlank(Current + 1)))) {
1469 StringRef::iterator i = skip_nb_char(Current);
1470 if (i == Current)
1472 Current = i;
1477 if (!isBlankOrBreak(Current))
1481 StringRef::iterator Tmp = Current;
1504 Current = Tmp;
1506 if (Start == Current) {
1512 T.Range = StringRef(Start, Current - Start);
1525 StringRef::iterator Start = Current;
1528 while (Current != End) {
1529 if ( *Current == '[' || *Current == ']'
1530 || *Current == '{' || *Current == '}'
1531 || *Current == ','
1532 || *Current == ':')
1534 StringRef::iterator i = skip_ns_char(Current);
1535 if (i == Current)
1537 Current = i;
1541 if (Start + 1 == Current) {
1548 T.Range = StringRef(Start, Current - Start);
1572 if (Current != End && (*Current == '>' || *Current == '|')) {
1573 Indicator = *Current;
1581 if (Current != End && (*Current == '+' || *Current == '-')) {
1582 Indicator = *Current;
1604 if (Current != End && (*Current >= '1' && *Current <= '9')) {
1605 Indent = unsigned(*Current - '0');
1613 auto Start = Current;
1620 Current = skip_while(&Scanner::skip_s_white, Current);
1623 if (Current == End) { // EOF, we have an empty scalar.
1626 T.Range = StringRef(Start, Current - Start);
1633 setError("Expected a line break after block scalar header", Current);
1647 if (skip_nb_char(Current) != Current) {
1663 if (skip_b_break(Current) != Current &&
1668 LongestAllSpaceLine = Current;
1672 if (Current == End) {
1690 auto I = skip_s_space(Current);
1691 if (I == Current)
1693 Current = I;
1697 if (skip_nb_char(Current) == Current)
1706 if (Current != End && *Current == '#') { // Trailing comment.
1710 setError("A text line is less indented than the block scalar", Current);
1717 assert(*Current == '|' || *Current == '>');
1729 const auto *Start = Current;
1746 // Parse the current line.
1747 auto LineStart = Current;
1749 if (LineStart != Current) {
1756 isLineEmpty(StringRef(LineStart, Current - LineStart))
1767 Str.append(StringRef(LineStart, Current - LineStart));
1772 if (Current == End)
1780 if (Current == End && !LineBreaks)
1792 T.Range = StringRef(Start, Current - Start);
1799 StringRef::iterator Start = Current;
1802 if (Current == End || isBlankOrBreak(Current)); // An empty tag.
1803 else if (*Current == '<') {
1810 Current = skip_while(&Scanner::skip_ns_char, Current);
1815 T.Range = StringRef(Start, Current - Start);
1833 if (Current == End)
1840 if (Column == 0 && *Current == '%')
1843 if (Column == 0 && Current + 4 <= End
1844 && *Current == '-'
1845 && *(Current + 1) == '-'
1846 && *(Current + 2) == '-'
1847 && (Current + 3 == End || isBlankOrBreak(Current + 3)))
1850 if (Column == 0 && Current + 4 <= End
1851 && *Current == '.'
1852 && *(Current + 1) == '.'
1853 && *(Current + 2) == '.'
1854 && (Current + 3 == End || isBlankOrBreak(Current + 3)))
1857 if (*Current == '[')
1860 if (*Current == '{')
1863 if (*Current == ']')
1866 if (*Current == '}')
1869 if (*Current == ',')
1872 if (*Current == '-' && (isBlankOrBreak(Current + 1) || Current + 1 == End))
1875 if (*Current == '?' && (Current + 1 == End || isBlankOrBreak(Current + 1)))
1878 if (*Current == ':' &&
1879 (!isPlainSafeNonBlank(Current + 1) || IsAdjacentValueAllowedInFlow))
1882 if (*Current == '*')
1885 if (*Current == '&')
1888 if (*Current == '!')
1891 if (*Current == '|' && !FlowLevel)
1894 if (*Current == '>' && !FlowLevel)
1897 if (*Current == '\'')
1900 if (*Current == '"')
1904 StringRef FirstChar(Current, 1);
1905 if ((!isBlankOrBreak(Current) &&
1908 isPlainSafeNonBlank(Current + 1)))
1911 setError("Unrecognized character while tokenizing.", Current);