summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse/parse_py/BBHandler.py
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2011-01-04 13:34:08 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-01-10 13:24:03 +0000
commitb127874ee6f7b8801575a10f4b7df02783aafdeb (patch)
treed16a7aeb08cb5e41996b3d5ce68bee24a75911ba /bitbake/lib/bb/parse/parse_py/BBHandler.py
parentf305e95840a887bbd97e9003e7a0f9135df77fcb (diff)
downloadpoky-b127874ee6f7b8801575a10f4b7df02783aafdeb.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. (Bitbake rev: 9615c538b894f71a2d1a0ba6b3f260db91e75786) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/parse/parse_py/BBHandler.py')
-rw-r--r--bitbake/lib/bb/parse/parse_py/BBHandler.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/bitbake/lib/bb/parse/parse_py/BBHandler.py b/bitbake/lib/bb/parse/parse_py/BBHandler.py
index 81554b9435..4a938b911c 100644
--- a/bitbake/lib/bb/parse/parse_py/BBHandler.py
+++ b/bitbake/lib/bb/parse/parse_py/BBHandler.py
@@ -172,7 +172,7 @@ def feeder(lineno, s, fn, root, statements):
172 if __infunc__: 172 if __infunc__:
173 if s == '}': 173 if s == '}':
174 __body__.append('') 174 __body__.append('')
175 ast.handleMethod(statements, __infunc__, lineno, fn, __body__) 175 ast.handleMethod(statements, fn, lineno, __infunc__, __body__)
176 __infunc__ = "" 176 __infunc__ = ""
177 __body__ = [] 177 __body__ = []
178 else: 178 else:
@@ -185,7 +185,8 @@ def feeder(lineno, s, fn, root, statements):
185 __body__.append(s) 185 __body__.append(s)
186 return 186 return
187 else: 187 else:
188 ast.handlePythonMethod(statements, __inpython__, root, __body__, fn) 188 ast.handlePythonMethod(statements, fn, lineno, __inpython__,
189 root, __body__)
189 __body__ = [] 190 __body__ = []
190 __inpython__ = False 191 __inpython__ = False
191 192
@@ -206,7 +207,7 @@ def feeder(lineno, s, fn, root, statements):
206 m = __func_start_regexp__.match(s) 207 m = __func_start_regexp__.match(s)
207 if m: 208 if m:
208 __infunc__ = m.group("func") or "__anonymous" 209 __infunc__ = m.group("func") or "__anonymous"
209 ast.handleMethodFlags(statements, __infunc__, m) 210 ast.handleMethodFlags(statements, fn, lineno, __infunc__, m)
210 return 211 return
211 212
212 m = __def_regexp__.match(s) 213 m = __def_regexp__.match(s)
@@ -218,22 +219,22 @@ def feeder(lineno, s, fn, root, statements):
218 219
219 m = __export_func_regexp__.match(s) 220 m = __export_func_regexp__.match(s)
220 if m: 221 if m:
221 ast.handleExportFuncs(statements, m, classes) 222 ast.handleExportFuncs(statements, fn, lineno, m, classes)
222 return 223 return
223 224
224 m = __addtask_regexp__.match(s) 225 m = __addtask_regexp__.match(s)
225 if m: 226 if m:
226 ast.handleAddTask(statements, m) 227 ast.handleAddTask(statements, fn, lineno, m)
227 return 228 return
228 229
229 m = __addhandler_regexp__.match(s) 230 m = __addhandler_regexp__.match(s)
230 if m: 231 if m:
231 ast.handleBBHandlers(statements, m) 232 ast.handleBBHandlers(statements, fn, lineno, m)
232 return 233 return
233 234
234 m = __inherit_regexp__.match(s) 235 m = __inherit_regexp__.match(s)
235 if m: 236 if m:
236 ast.handleInherit(statements, m) 237 ast.handleInherit(statements, fn, lineno, m)
237 return 238 return
238 239
239 return ConfHandler.feeder(lineno, s, fn, statements) 240 return ConfHandler.feeder(lineno, s, fn, statements)