http://codereview.chromium.org/2800042/diff/3001/4001 File tools/js2c.py (right):
http://codereview.chromium.org/2800042/diff/3001/4001#newcode118 tools/js2c.py:118: start = lines.find(name + '(', offset) You probably wanted: start = lines.find(name + '(', start) here. Maybe it is better (more python-ish?) to make a regexp from macro name? re.compile('[^0-9a-zA-Z_]' + name + '(') something like that? http://codereview.chromium.org/2800042/diff/3001/4001#newcode119 tools/js2c.py:119: if start >= 0 and IDENTIFIER_PART_PATTERN.match(lines[start - 1]): start > 0 to avoid referencing lines[-1] (which is last char of string) http://codereview.chromium.org/2800042/diff/3001/4001#newcode122 tools/js2c.py:122: return start control flow of this function is not obvious from my point of view. if you do not like switching to regex solution maybe revert condition? if start <= 0 or not IDENTIFIER_PART_PATTERN.match(lines[start - 1]): return start start += len(name) + 1 http://codereview.chromium.org/2800042/show -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
