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:
Родитель
4b279f0092
Коммит
457d529241
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче