From 4b25b519ae46b283988a1847e56a19b01269b3a4 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Mon, 18 May 2009 19:24:07 +0200 Subject: bitbake: [parser] Cary a Statement Node through the parsing When parsing we will collect a number of statements that can be evaluated...The plan is to be evaluate things twice (old+new) and then compare the result, it should be the same. Signed-off-by: Richard Purdie --- bitbake/lib/bb/parse/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/bb/parse/__init__.py') diff --git a/bitbake/lib/bb/parse/__init__.py b/bitbake/lib/bb/parse/__init__.py index c6a925c7a8..f97233fc2b 100644 --- a/bitbake/lib/bb/parse/__init__.py +++ b/bitbake/lib/bb/parse/__init__.py @@ -68,11 +68,15 @@ def supports(fn, data): return 1 return 0 -def handle(fn, data, include = 0): +def handle(fn, data, include = 0, statements = None): """Call the handler that is appropriate for this file""" + if not statements: + import ast + statements = ast.StatementGroup() + for h in handlers: if h['supports'](fn, data): - return h['handle'](fn, data, include) + return h['handle'](fn, data, include, statements) raise ParseError("%s is not a BitBake file" % fn) def init(fn, data): -- cgit v1.2.3-54-g00ecf