tools: fix js2c macro expansion bug

If the same macro was used twice in close proximity, the second one
didn't get expanded.
This commit is contained in:
Ben Noordhuis 2013-07-24 18:13:25 +02:00
Родитель 4b279f0092
Коммит 457d529241
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -150,9 +150,10 @@ def ExpandMacros(lines, macros):
result = macro.expand(mapping)
# Replace the occurrence of the macro with the expansion
lines = lines[:start] + result + lines[end:]
start = lines.find(name + '(', end)
start = lines.find(name + '(', start)
return lines
class TextMacro:
def __init__(self, args, body):
self.args = args