Lines Matching refs:StringRef
21 #include "llvm/ADT/StringRef.h"
62 static EncodingInfo getUnicodeEncoding(StringRef Input) {
155 StringRef Range;
198 static UTF8Decoded decodeUTF8(StringRef Range) {
199 StringRef::iterator Position= Range.begin();
200 StringRef::iterator End = Range.end();
254 Scanner(StringRef Input, SourceMgr &SM, bool ShowColors = true,
270 void setError(const Twine &Message, StringRef::iterator Position) {
293 StringRef currentInput() {
294 return StringRef(Current, End - Current);
303 UTF8Decoded decodeUTF8(StringRef::iterator Position) {
304 return ::decodeUTF8(StringRef(Position, End - Position));
334 StringRef::iterator skip_nb_char(StringRef::iterator Position);
342 StringRef::iterator skip_b_break(StringRef::iterator Position);
350 StringRef::iterator skip_s_space(StringRef::iterator Position);
358 StringRef::iterator skip_s_white(StringRef::iterator Position);
366 StringRef::iterator skip_ns_char(StringRef::iterator Position);
368 using SkipWhileFunc = StringRef::iterator (Scanner::*)(StringRef::iterator);
375 StringRef::iterator skip_while( SkipWhileFunc Func
376 , StringRef::iterator Position);
397 bool isBlankOrBreak(StringRef::iterator Position);
514 StringRef::iterator Current;
517 StringRef::iterator End;
589 bool yaml::dumpTokens(StringRef Input, raw_ostream &OS) {
673 bool yaml::scanTokens(StringRef Input) {
686 std::string yaml::escape(StringRef Input, bool EscapePrintable) {
688 for (StringRef::iterator i = Input.begin(), e = Input.end(); i != e; ++i) {
716 = decodeUTF8(StringRef(i, Input.end() - i));
735 EscapedInput += StringRef(i, UnicodeScalarValue.second);
752 Scanner::Scanner(StringRef Input, SourceMgr &sm, bool ShowColors,
821 StringRef::iterator Scanner::skip_nb_char(StringRef::iterator Position) {
846 StringRef::iterator Scanner::skip_b_break(StringRef::iterator Position) {
860 StringRef::iterator Scanner::skip_s_space(StringRef::iterator Position) {
868 StringRef::iterator Scanner::skip_s_white(StringRef::iterator Position) {
876 StringRef::iterator Scanner::skip_ns_char(StringRef::iterator Position) {
884 StringRef::iterator Scanner::skip_while( SkipWhileFunc Func
885 , StringRef::iterator Position) {
887 StringRef::iterator i = (this->*Func)(Position);
922 || StringRef(Current, 1).find_first_of("#;/?:@&=+$,_.!~*'()[]")
923 != StringRef::npos) {
956 bool Scanner::isBlankOrBreak(StringRef::iterator Position) {
1013 T.Range = StringRef(Current, 1);
1032 T.Range = StringRef(Current, 0);
1044 StringRef::iterator I = skip_nb_char(Current);
1061 StringRef::iterator i = skip_b_break(Current);
1080 T.Range = StringRef(Current, EI.second);
1099 T.Range = StringRef(Current, 0);
1110 StringRef::iterator Start = Current;
1112 StringRef::iterator NameStart = Current;
1114 StringRef Name(NameStart, Current - NameStart);
1121 T.Range = StringRef(Start, Current - Start);
1129 T.Range = StringRef(Start, Current - Start);
1143 T.Range = StringRef(Current, 3);
1153 T.Range = StringRef(Current, 1);
1172 T.Range = StringRef(Current, 1);
1185 T.Range = StringRef(Current, 1);
1197 T.Range = StringRef(Current, 1);
1212 T.Range = StringRef(Current, 1);
1249 T.Range = StringRef(Current, 1);
1258 wasEscaped(StringRef::iterator First, StringRef::iterator Position);
1262 static bool wasEscaped(StringRef::iterator First,
1263 StringRef::iterator Position) {
1265 StringRef::iterator I = Position - 1;
1275 StringRef::iterator Start = Current;
1296 StringRef::iterator i = skip_nb_char(Current);
1321 T.Range = StringRef(Start, Current - Start);
1332 StringRef::iterator Start = Current;
1351 && (StringRef(Current, 1).find_first_of(",:?[]{}")
1352 != StringRef::npos)))
1355 StringRef::iterator i = skip_nb_char(Current);
1367 StringRef::iterator Tmp = Current;
1369 StringRef::iterator i = skip_s_white(Tmp);
1398 T.Range = StringRef(Start, Current - Start);
1410 StringRef::iterator Start = Current;
1419 StringRef::iterator i = skip_ns_char(Current);
1433 T.Range = StringRef(Start, Current - Start);
1458 unsigned LineBreaks, StringRef Str) {
1491 T.Range = StringRef(Start, Current - Start);
1508 StringRef::iterator LongestAllSpaceLine;
1616 Str.append(StringRef(LineStart, Current - LineStart));
1640 T.Range = StringRef(Start, Current - Start);
1647 StringRef::iterator Start = Current;
1663 T.Range = StringRef(Start, Current - Start);
1750 StringRef FirstChar(Current, 1);
1752 || FirstChar.find_first_of("-?:,[]{}#&*!|>'\"%@`") != StringRef::npos)
1766 Stream::Stream(StringRef Input, SourceMgr &SM, bool ShowColors,
1806 Node::Node(unsigned int Type, std::unique_ptr<Document> &D, StringRef A,
1807 StringRef T)
1814 StringRef Raw = getRawTag();
1826 StringRef TagHandle = Raw.substr(0, Raw.find_last_of('!') + 1);
1827 std::map<StringRef, StringRef>::const_iterator It =
1882 StringRef ScalarNode::getValue(SmallVectorImpl<char> &Storage) const {
1886 StringRef UnquotedValue = Value.substr(1, Value.size() - 2);
1888 StringRef::size_type i = UnquotedValue.find_first_of("\\\r\n");
1889 if (i != StringRef::npos)
1894 StringRef UnquotedValue = Value.substr(1, Value.size() - 2);
1895 StringRef::size_type i = UnquotedValue.find('\'');
1896 if (i != StringRef::npos) {
1900 for (; i != StringRef::npos; i = UnquotedValue.find('\'')) {
1901 StringRef Valid(UnquotedValue.begin(), i);
1907 return StringRef(Storage.begin(), Storage.size());
1915 StringRef ScalarNode::unescapeDoubleQuoted( StringRef UnquotedValue
1916 , StringRef::size_type i
1922 for (; i != StringRef::npos; i = UnquotedValue.find_first_of("\\\r\n")) {
1924 StringRef Valid(UnquotedValue.begin(), i);
1944 T.Range = StringRef(UnquotedValue.begin(), 1);
1952 T.Range = StringRef(UnquotedValue.begin(), 1);
2058 return StringRef(Storage.begin(), Storage.size());
2392 StringRef NullTerminatedStr(T.Value.c_str(), T.Value.length() + 1);
2393 StringRef StrCopy = NullTerminatedStr.copy(NodeAllocator).drop_back();
2450 StringRef T = Tag.Range;
2454 StringRef TagHandle = T.substr(0, HandleEnd);
2455 StringRef TagPrefix = T.substr(HandleEnd).ltrim(" \t");