Home | History | Annotate | Download | only in Support

Lines Matching refs:Position

214   StringRef::iterator Position= Range.begin();
218 if ((*Position & 0x80) == 0) {
219 return std::make_pair(*Position, 1);
223 if (Position + 1 != End &&
224 ((*Position & 0xE0) == 0xC0) &&
225 ((*(Position + 1) & 0xC0) == 0x80)) {
226 uint32_t codepoint = ((*Position & 0x1F) << 6) |
227 (*(Position + 1) & 0x3F);
233 if (Position + 2 != End &&
234 ((*Position & 0xF0) == 0xE0) &&
235 ((*(Position + 1) & 0xC0) == 0x80) &&
236 ((*(Position + 2) & 0xC0) == 0x80)) {
237 uint32_t codepoint = ((*Position & 0x0F) << 12) |
238 ((*(Position + 1) & 0x3F) << 6) |
239 (*(Position + 2) & 0x3F);
248 if (Position + 3 != End &&
249 ((*Position & 0xF8) == 0xF0) &&
250 ((*(Position + 1) & 0xC0) == 0x80) &&
251 ((*(Position + 2) & 0xC0) == 0x80) &&
252 ((*(Position + 3) & 0xC0) == 0x80)) {
253 uint32_t codepoint = ((*Position & 0x07) << 18) |
254 ((*(Position + 1) & 0x3F) << 12) |
255 ((*(Position + 2) & 0x3F) << 6) |
256 (*(Position + 3) & 0x3F);
282 void setError(const Twine &Message, StringRef::iterator Position) {
310 /// at \a Position.
312 /// If the UTF-8 code units starting at Position do not form a well-formed
315 UTF8Decoded decodeUTF8(StringRef::iterator Position) {
316 return ::decodeUTF8(StringRef(Position, End - Position));
339 /// @brief Skip a single nb-char[27] starting at Position.
344 /// @returns The code unit after the nb-char, or Position if it's not an
346 StringRef::iterator skip_nb_char(StringRef::iterator Position);
348 /// @brief Skip a single b-break[28] starting at Position.
352 /// @returns The code unit after the b-break, or Position if it's not a
354 StringRef::iterator skip_b_break(StringRef::iterator Position);
356 /// Skip a single s-space[31] starting at Position.
360 /// @returns The code unit after the s-space, or Position if it's not a
362 StringRef::iterator skip_s_space(StringRef::iterator Position);
364 /// @brief Skip a single s-white[33] starting at Position.
368 /// @returns The code unit after the s-white, or Position if it's not a
370 StringRef::iterator skip_s_white(StringRef::iterator Position);
372 /// @brief Skip a single ns-char[34] starting at Position.
376 /// @returns The code unit after the ns-char, or Position if it's not a
378 StringRef::iterator skip_ns_char(StringRef::iterator Position);
387 , StringRef::iterator Position);
411 bool isBlankOrBreak(StringRef::iterator Position);
413 /// Consume a single b-break[28] if it's present at the current position.
415 /// Return false if the code unit at the current position isn't a line break.
443 /// position of the scanner.
527 /// @brief The current position of the scanner.
829 StringRef::iterator Scanner::skip_nb_char(StringRef::iterator Position) {
830 if (Position == End)
831 return Position;
833 if ( *Position == 0x09
834 || (*Position >= 0x20 && *Position <= 0x7E))
835 return Position + 1;
838 if (uint8_t(*Position) & 0x80) {
839 UTF8Decoded u8d = decodeUTF8(Position);
849 return Position + u8d.second;
851 return Position;
854 StringRef::iterator Scanner::skip_b_break(StringRef::iterator Position) {
855 if (Position == End)
856 return Position;
857 if (*Position == 0x0D) {
858 if (Position + 1 != End && *(Position + 1) == 0x0A)
859 return Position + 2;
860 return Position + 1;
863 if (*Position == 0x0A)
864 return Position + 1;
865 return Position;
868 StringRef::iterator Scanner::skip_s_space(StringRef::iterator Position) {
869 if (Position == End)
870 return Position;
871 if (*Position == ' ')
872 return Position + 1;
873 return Position;
876 StringRef::iterator Scanner::skip_s_white(StringRef::iterator Position) {
877 if (Position == End)
878 return Position;
879 if (*Position == ' ' || *Position == '\t')
880 return Position + 1;
881 return Position;
884 StringRef::iterator Scanner::skip_ns_char(StringRef::iterator Position) {
885 if (Position == End)
886 return Position;
887 if (*Position == ' ' || *Position == '\t')
888 return Position;
889 return skip_nb_char(Position);
893 , StringRef::iterator Position) {
895 StringRef::iterator i = (this->*Func)(Position);
896 if (i == Position)
898 Position = i;
900 return Position;
962 bool Scanner::isBlankOrBreak(StringRef::iterator Position) {
963 if (Position == End)
965 return *Position == ' ' || *Position == '\t' || *Position == '\r' ||
966 *Position == '\n';
1261 wasEscaped(StringRef::iterator First, StringRef::iterator Position);
1263 // Returns whether a character at 'Position' was escaped with a leading '\'.
1264 // 'First' specifies the position of the first character in the string.
1266 StringRef::iterator Position) {
1267 assert(Position - 1 >= First);
1268 StringRef::iterator I = Position - 1;
1269 // We calculate the number of consecutive '\'s before the current position
1272 // (Position - 1 - I) now contains the number of '\'s before the current
1273 // position. If it is odd, the character at 'Position' was escaped.
1274 return (Position - 1 - I) % 2 == 1;