Lines Matching refs:name_pattern
99 def ExpandMacroDefinition(lines, pos, name_pattern, macro, expander):
100 pattern_match = name_pattern.search(lines, pos)
114 raise Error('line %s: Too many arguments for macro "%s"' % (lineno, name_pattern.pattern))
132 raise Error('line %s: Too few arguments for macro "%s"' % (lineno, name_pattern.pattern))
136 pattern_match = name_pattern.search(lines, start + len(result))
142 for name_pattern, macro in reversed(macros):
145 lines = ExpandMacroDefinition(lines, 0, name_pattern, macro, expander)
222 name_pattern = re.compile("\\b%s\\(" % name)
230 lines = ExpandMacroDefinition(lines, pos, name_pattern, macro, non_expander)
244 name_pattern = re.compile("\\b%s\\b" % name)
248 re.sub(name_pattern, replacement, lines[const_match.end():]))