Lines Matching refs:Match

822 # Match start of assembly blocks
827 # Match strings that indicate we're working on a C (not C++) file.
831 # Match string that indicates we're working on a Linux Kernel file.
1034 def Match(pattern, s):
1036 # The regexp compilation caching is inlined in both Match and Search for
1047 The compiled regex is kept in a cache shared by Match and Search.
1186 Match(r'^\s*#\s*include\b', clean_lines.elided[linenum - 1])):
1528 if Match(r'T(EST|est)', self.current_function):
1736 # Match a single C style comment on the same line.
1800 leading_space = Match(r'^(\s*)\S', line)
1821 matched = Match(r'^(.*?)\b(?:R|u8R|uR|UR|LR)"([^\s\\()]*)\((.*)$', line)
1823 not Match(r'^([^\'"]|\'(\\.|[^\'])*\'|"(\\.|[^"])*")*//',
1960 match = Match(r'^([^\'"]*)([\'"])(.*)$', elided)
1986 match_literal = Match(r'^((?:\'?[0-9a-zA-Z_])*)(.*)$', "'" + tail)
2104 if (line[pos] not in '({[<') or Match(r'<[<=]', line[pos:]):
2152 Match(r'\s>=\s', line[i - 1:]) or
2261 indent = Match(r'^( *)\S', line)
2440 match = Match(r'#endif\s*//\s*' + cppvar + r'(_)?\b', endif)
2454 if Match(r'^(?:(?:\'(?:\.|[^\'])*\')|(?:"(?:\.|[^"])*")|[^\'"])*//', line):
2459 match = Match(r'#endif\s*/\*\s*' + cppvar + r'(_)?\s*\*/', endif)
2699 return Match(r'^\s*(\btemplate\b)*.*class\s+\w+;\s*$', clean_lines[linenum])
2812 if not Match(r'^\s*$', clean_lines.elided[i]):
2818 indent = Match(r'^( *)\}', clean_lines.elided[linenum])
2852 and not Match(r'^\s*};*\s*(//|/\*).*\bnamespace\b', line)):
2869 if not Match((r'^\s*};*\s*(//|/\*).*\bnamespace\s+' +
2877 if not Match(r'^\s*};*\s*(//|/\*).*\bnamespace[\*/\.\\\s]*$', line):
2880 if Match(r'^\s*}.*\b(namespace anonymous|anonymous namespace)\b', line):
2983 match = Match(r'^[^{};=\[\]\.<>]*(.)', line[pos:])
3043 if Match(r'^\s*#\s*(if|ifdef|ifndef)\b', line):
3047 elif Match(r'^\s*#\s*(else|elif)\b', line):
3062 elif Match(r'^\s*#\s*endif\b', line):
3130 # Match start of namespace. The "\b\s*" below catches namespace
3134 namespace_decl_match = Match(r'^\s*namespace\b\s*([:\w]+)?(.*)$', line)
3151 class_decl_match = Match(
3181 access_match = Match(
3192 Match(r'^\s*$', indent)):
3206 # Match first brace, semicolon, or closed parenthesis.
3207 matched = Match(r'^[^{;)}]*([{;)}])(.*)$', line)
3218 elif Match(r'^extern\s*"[^"]*"\s*\{', line):
3336 if Match(r'\s*#\s*endif\s*[^/\s]+', line):
3340 if Match(r'\s*class\s+(\w+\s*::\s*)+\w+\s*;', line):
3374 explicit_constructor_match = Match(
3421 Match(r'((const\s+(volatile\s+)?)?|(volatile\s+(const\s+)?))?'
3577 match_result = Match(regexp, line)
3583 not Match(r'[A-Z_]+$', function_name)):
3597 if Match(r'TEST', function): # Handle TEST... macros
3609 elif Match(r'^\}\s*$', line): # function end
3612 elif not Match(r'^\s*$', line):
3634 if (not (Match(r'^.*{ *//', line) and next_line_start == commentpos) and
3667 if (Match(r'//[^ ]*\w', comment) and
3668 not Match(r'(///|//\!)(\s+|$)', comment)):
3731 if Match(r' {6}\w', prev_line): # Initializer list?
3736 and Match(r' {6}\w', elided[search_position])):
3747 exception = (Match(r' {4}\w[^\(]*\)\s*(const\s*)?(\{\s*$|:)',
3749 or Match(r' {4}:', prev_line))
3766 and Match(r'\s*}', next_line)
3772 matched = Match(r'\s*(public|protected|private):', prev_line)
3820 match = Match(r'^(.*\boperator\b)(\S+)(\s*\(.*)$', line)
3858 elif not Match(r'#.*include', line):
3863 match = Match(r'^(.*[^\s<])<[^\s=<,]', line)
3874 match = Match(r'^(.*[^-\s>])>[^\s=>,]', line)
4003 last_word = Match(r'^.*(\b\S+)$', expr)
4009 # Match native types and stdint types
4073 match = Match(r'^(.*[^ ({>]){', line)
4116 if (not Match(r'^[\s}]*[{.;,)<>\]:]', trailing_text)
4187 matched = Match(r'\s*(public|protected|private):', clean_lines.lines[linenum])
4250 if Match(r'\s*{\s*$', line):
4262 not Match(r'\s*#', prevline) and
4268 if Match(r'\s*else\b\s*(?:if\b|\{|$)', line):
4270 if Match(r'\s*}\s*$', prevline):
4287 elif Search(r'}\s*else[^{]*$', line) or Match(r'[^}]*else\s*{', line):
4297 if Match(r'\s*do [^\s{]', line):
4309 if if_else_match and not Match(r'\s*#', line):
4319 if (not Match(r'\s*{', endline[endpos:])
4320 and not (Match(r'\s*$', endline[endpos:])
4322 and Match(r'\s*{', clean_lines.elided[endlinenum + 1]))):
4332 if not Match(r';[\s}]*(\\?)$', endline[endpos:]):
4336 if not Match(r'^[^{};]*\[[^\[\]]*\][^{}]*\{[^{}]*\}\s*\)*[;,]\s*$',
4347 if (if_match and Match(r'\s*else\b', next_line)
4413 match = Match(r'^(.*\)\s*)\{', line)
4447 func = Match(r'^(.*\])\s*$', line_prefix)
4466 match = Match(r'^(.*(?:else|\)\s*const)\s*)\{', line)
4478 match = Match(r'^(\s*)\{', line)
4484 if endpos > -1 and Match(r'^\s*;', endline[endpos:]):
4521 matched = Match(r'\s*(for|while|if)\s*\(', line)
4530 if end_pos >= 0 and Match(r';', end_line[end_pos:]):
4624 matched = Match(r'^(.*\b' + macro + r'\s*)\(', line)
4656 if not Match(r'\s*;', last_line[end_pos:]):
4674 matched = Match(r'^\s*(<<|<<=|>>|>>=|->\*|->|&&|\|\||'
4708 matched = Match(r'^([^-=!<>()&|]+)(.*)$', expression)
4710 matched = Match(r'^(\s*\S)(.*)$', expression)
4734 if Match(match_constant, lhs) or Match(match_constant, rhs):
4761 if Match(r'^\s*#', line):
4867 not Match(scope_or_label_pattern, cleansed_line) and
4869 Match(r'^\s*""', line))):
4898 not Match(r'^\s*//.*http(s?)://\S*$', line) and
4899 not Match(r'^\s*//\s*[^\s]*$', line) and
4900 not Match(r'^// \$Id:.*#[0-9]+ \$$', line) and
4901 not Match(r'^\s*/// [@\\](copydoc|copydetails|copybrief) .*$', line)):
4909 not Match(r'^[^{};]*\[[^\[\]]*\][^{}]*\{[^{}\n\r]*\}',
5077 match = Match(r'#include\s*"([^/]+\.(.*))"', line)
5261 match = Match(r'^\s*#\s*(if|ifdef|ifndef|elif|else|endif)\b', line)
5316 match = Match(r'([\w.\->()]+)$', printf_args)
5326 if match and not Match(r"^''|-?[0-9]+|0x[0-9A-Fa-f]$", match.group(2)):
5342 match = Match(r'\s*(.+::)?(\w+) [a-z]\w*\[(.+)];', line)
5362 if Match(r'\d+', tok): continue
5363 if Match(r'0[xX][0-9a-fA-F]+', tok): continue
5364 if Match(r'k[A-Z0-9]\w*', tok): continue
5365 if Match(r'(.+::)?k[A-Z0-9]\w*', tok): continue
5366 if Match(r'(.+::)?[A-Z][A-Z0-9_]*', tok): continue
5403 # Match two lines at a time to support multiline declarations
5413 match = Match(
5437 not Match(r'\s*(<.*>)?(::[a-zA-Z0-9_]+)*\s*\(([^"]|$)', match.group(4))):
5494 match = Match(r'^([^()]*\w+)\(', clean_lines.elided[i])
5515 if Match(r'^([^()]*\w+)\(', clean_lines.elided[i]):
5516 return Match(r'^[^()]*\w+::\w+\(', clean_lines.elided[i]) is not None
5533 remove_function_body = Match(r'^(.*)\{\s*$', line)
5611 if Match(r'\s*::(?:[\w<>]|::)+\s*&\s*\S', line):
5615 elif Match(r'\s*[a-zA-Z_]([\w<>]|::)+\s*&\s*\S', line):
5659 if Match(r'^\s*:\s+\S', previous_line):
5693 if (not Match(_RE_PATTERN_CONST_REF_PARAM, parameter) and
5694 not Match(_RE_PATTERN_REF_STREAM_PARAM, parameter)):
5740 if Match(r'\([^()]+\)\s*\[', match.group(3)):
5751 (Match(r'\((?:[^() ]+::\s*\*\s*)?[^() ]+\)\s*\(',
5754 not Match(r'\s*using\s+\S+\s*=\s*' + matched_type, line) and
5796 match = Match(r'^(.*&(?:static|dynamic|down|reinterpret)_cast\b)<', line)
5805 if Match(r'\s*(?:->|\[)', extended_line):
5843 if Match(r'.*\b(?:sizeof|alignof|alignas|[_A-Z][_A-Z0-9]*)\s*$', context):
5851 if Match(r'.*\b[_A-Z][_A-Z0-9]*\s*\((?:\([^()]*\)|[^()])*$', context):
5861 if Match(r'^\s*(?:;|const\b|throw\b|final\b|override\b|[=>{),]|->)',
5885 return (Match(r'^\s*MOCK_(CONST_)?METHOD\d+(_T)?\(', line) or
5887 (Match(r'^\s*MOCK_(?:CONST_)?METHOD\d+(?:_T)?\((?:\S+,)?\s*$',
5889 Match(r'^\s*MOCK_(?:CONST_)?METHOD\d+(?:_T)?\(\s*$',
5948 # Match max<type>(..., ...), max(..., ...), but not foo->max, foo.max or
5954 # Match set<type>, but not foo->set<type>, foo.set<type>
5959 # Match 'map<type> var' and 'std::map<type>(...)', but not 'map<type>(...)''
6197 virtual = Match(r'^(.*)(\bvirtual\b)(.*)$', line)
6204 Match(r'^\s+(public|protected|private)\b', virtual.group(3))):
6210 if Match(r'^.*[^:]:[^:].*$', line): return
6222 parameter_list = Match(r'^([^(]*)\(', line)
6224 # Match parentheses to find the end of the parameter list
6338 if Match(r'^\s+', line):
6399 include = Match(r'\s*#\s*include\s+[<"]([^<"]+)[">]', line)
6423 if Match(r'\s*#', line) and not Match(r'\s*#\s*define\b', line): return
6451 include = Match(r'\s*#\s*include\s+[<"]([^<"]+)[">]', line)