Lines Matching refs:Code
59 : Code(MatcherCode), StartOfLine(MatcherCode), Line(1), Error(Error) { in CodeTokenizer()
81 if (Code.empty()) { in getNextToken()
87 switch (Code[0]) { in getNextToken()
90 Result.Text = Code.substr(0, 1); in getNextToken()
91 Code = Code.drop_front(); in getNextToken()
95 Result.Text = Code.substr(0, 1); in getNextToken()
96 Code = Code.drop_front(); in getNextToken()
100 Result.Text = Code.substr(0, 1); in getNextToken()
101 Code = Code.drop_front(); in getNextToken()
105 Result.Text = Code.substr(0, 1); in getNextToken()
106 Code = Code.drop_front(); in getNextToken()
122 if (isAlphanumeric(Code[0])) { in getNextToken()
125 while (TokenLength < Code.size() && isAlphanumeric(Code[TokenLength])) in getNextToken()
128 Result.Text = Code.substr(0, TokenLength); in getNextToken()
129 Code = Code.drop_front(TokenLength); in getNextToken()
132 Result.Text = Code.substr(0, 1); in getNextToken()
133 Code = Code.drop_front(1); in getNextToken()
145 if (Code.size() > 1) { in consumeUnsignedLiteral()
147 switch (toLowercase(Code[1])) { in consumeUnsignedLiteral()
151 while (Length < Code.size() && isHexDigit(Code[Length])) in consumeUnsignedLiteral()
154 Result->Text = Code.substr(0, Length); in consumeUnsignedLiteral()
155 Code = Code.drop_front(Length); in consumeUnsignedLiteral()
176 const char Marker = Code[0]; in consumeStringLiteral()
177 for (size_t Length = 1, Size = Code.size(); Length != Size; ++Length) { in consumeStringLiteral()
182 if (Code[Length] == '\\') { in consumeStringLiteral()
186 if (Code[Length] == Marker) { in consumeStringLiteral()
188 Result->Text = Code.substr(0, Length + 1); in consumeStringLiteral()
189 Result->Value = Code.substr(1, Length - 1).str(); in consumeStringLiteral()
190 Code = Code.drop_front(Length + 1); in consumeStringLiteral()
195 StringRef ErrorText = Code; in consumeStringLiteral()
196 Code = Code.drop_front(Code.size()); in consumeStringLiteral()
206 while (!Code.empty() && isWhitespace(Code[0])) { in consumeWhitespace()
207 if (Code[0] == '\n') { in consumeWhitespace()
209 StartOfLine = Code.drop_front(); in consumeWhitespace()
211 Code = Code.drop_front(); in consumeWhitespace()
218 Location.Column = Code.data() - StartOfLine.data() + 1; in currentLocation()
222 StringRef Code; member in clang::ast_matchers::dynamic::Parser::CodeTokenizer
375 bool Parser::parseExpression(StringRef Code, VariantValue *Value, in parseExpression() argument
378 return parseExpression(Code, &S, Value, Error); in parseExpression()
381 bool Parser::parseExpression(StringRef Code, Sema *S, in parseExpression() argument
383 CodeTokenizer Tokenizer(Code, Error); in parseExpression()
393 DynTypedMatcher *Parser::parseMatcherExpression(StringRef Code, in parseMatcherExpression() argument
396 return parseMatcherExpression(Code, &S, Error); in parseMatcherExpression()
399 DynTypedMatcher *Parser::parseMatcherExpression(StringRef Code, in parseMatcherExpression() argument
403 if (!parseExpression(Code, S, &Value, Error)) in parseMatcherExpression()