diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-07-24 18:13:25 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-07-24 21:49:34 +0200 |
commit | 457d52924152c6f2baf2fddbe76a03bca7bdde7c (patch) | |
tree | 6fd8aba9681deeaeaebad428eb0b8e4896f8a3e0 /tools/js2c.py | |
parent | 4b279f00921b251f58ff7213c6a1518c66281747 (diff) | |
download | nodejs-457d52924152c6f2baf2fddbe76a03bca7bdde7c.tar.gz nodejs-457d52924152c6f2baf2fddbe76a03bca7bdde7c.tar.bz2 nodejs-457d52924152c6f2baf2fddbe76a03bca7bdde7c.zip |
tools: fix js2c macro expansion bug
If the same macro was used twice in close proximity, the second one
didn't get expanded.
Diffstat (limited to 'tools/js2c.py')
-rwxr-xr-x | tools/js2c.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/js2c.py b/tools/js2c.py index 772a0f5f6..bbbccb289 100755 --- a/tools/js2c.py +++ b/tools/js2c.py @@ -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 |