Index: tools/js2c.py |
diff --git a/tools/js2c.py b/tools/js2c.py |
index a2ea8eacc79186313e3af025f98c67e429294578..1e26d9858368ff44d991f8244f6a278f1ed975da 100644 |
--- a/tools/js2c.py |
+++ b/tools/js2c.py |
@@ -128,12 +128,13 @@ def ExpandMacros(lines, macros): |
end = pattern_match.end() |
assert lines[end - 1] == '(' |
last_match = end |
- arg_index = 0 |
+ arg_index = [0] |
mapping = { } |
def add_arg(str): |
# Remember to expand recursively in the arguments |
replacement = ExpandMacros(str.strip(), macros) |
- mapping[macro.args[arg_index]] = replacement |
+ mapping[macro.args[arg_index[0]]] = replacement |
+ arg_index[0] += 1 |
while end < len(lines) and height > 0: |
# We don't count commas at higher nesting levels. |
if lines[end] == ',' and height == 1: |