Reviewers: Michael Achenbach,
Message:
PTAL
Description:
Adding js2c.py "Too many arguments" for Macros Error
BUG=
Please review this at https://codereview.chromium.org/1324103003/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+3, -0 lines):
M tools/js2c.py
Index: tools/js2c.py
diff --git a/tools/js2c.py b/tools/js2c.py
index
c2805373796f0c58f88cd2c63a2e25a6ab97637f..a8d7e459817cd3b1eeb640e6f2a4195a4cb0c007
100755
--- a/tools/js2c.py
+++ b/tools/js2c.py
@@ -108,6 +108,9 @@ def ExpandMacroDefinition(lines, pos, name_pattern,
macro, expander):
mapping = { }
def add_arg(str):
# Remember to expand recursively in the arguments
+ if arg_index[0] >= len(macro.args):
+ lineno = lines.count("\n", 0, start) + 1
+ raise Error('line %s: Too many arguments for macro "%s"' %
(lineno, name_pattern.pattern))
replacement = expander(str.strip())
mapping[macro.args[arg_index[0]]] = replacement
arg_index[0] += 1
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.