diff options
author | Chris Larson <chris_larson@mentor.com> | 2011-01-04 13:34:08 -0700 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2011-01-05 11:44:09 -0700 |
commit | 9615c538b894f71a2d1a0ba6b3f260db91e75786 (patch) | |
tree | 84d26db4e6348160092311cb981de3d4e86e61e7 /lib/bb/parse/parse_py/BBHandler.py | |
parent | aa9646717b3ee1006628246a7c495f601e62391c (diff) | |
download | bitbake-contrib-9615c538b894f71a2d1a0ba6b3f260db91e75786.tar.gz |
parse: pass filename, lineno into the ast
We will be needing this information to improve the tracebacks of python code
from the metadata, as well as to give the user information about where
variables were defined, so they know how it ended up the way it is.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/parse/parse_py/BBHandler.py')
-rw-r--r-- | lib/bb/parse/parse_py/BBHandler.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py index 35572cb1b..ab807261a 100644 --- a/lib/bb/parse/parse_py/BBHandler.py +++ b/lib/bb/parse/parse_py/BBHandler.py @@ -172,7 +172,7 @@ def feeder(lineno, s, fn, root, statements): if __infunc__: if s == '}': __body__.append('') - ast.handleMethod(statements, __infunc__, lineno, fn, __body__) + ast.handleMethod(statements, fn, lineno, __infunc__, __body__) __infunc__ = "" __body__ = [] else: @@ -185,7 +185,7 @@ def feeder(lineno, s, fn, root, statements): __body__.append(s) return else: - ast.handlePythonMethod(statements, root, __body__, fn) + ast.handlePythonMethod(statements, fn, lineno, root, __body__) __body__ = [] __inpython__ = False @@ -206,7 +206,7 @@ def feeder(lineno, s, fn, root, statements): m = __func_start_regexp__.match(s) if m: __infunc__ = m.group("func") or "__anonymous" - ast.handleMethodFlags(statements, __infunc__, m) + ast.handleMethodFlags(statements, fn, lineno, __infunc__, m) return m = __def_regexp__.match(s) @@ -217,22 +217,22 @@ def feeder(lineno, s, fn, root, statements): m = __export_func_regexp__.match(s) if m: - ast.handleExportFuncs(statements, m, classes) + ast.handleExportFuncs(statements, fn, lineno, m, classes) return m = __addtask_regexp__.match(s) if m: - ast.handleAddTask(statements, m) + ast.handleAddTask(statements, fn, lineno, m) return m = __addhandler_regexp__.match(s) if m: - ast.handleBBHandlers(statements, m) + ast.handleBBHandlers(statements, fn, lineno, m) return m = __inherit_regexp__.match(s) if m: - ast.handleInherit(statements, m) + ast.handleInherit(statements, fn, lineno, m) return return ConfHandler.feeder(lineno, s, fn, statements) |