summaryrefslogtreecommitdiffstats
path: root/lib/bb/parse/__init__.py
diff options
context:
space:
mode:
authorHolger Freyther <ich@tamarin.(none)>2009-05-18 19:24:07 +0200
committerRichard Purdie <rpurdie@linux.intel.com>2010-02-12 17:59:14 +0000
commit9fe314b8b86d3e8be442140a338663f926bd3769 (patch)
treea861b044956f79f073387ef102ddb690b2c8d249 /lib/bb/parse/__init__.py
parent1809bc0b55e68cfab165de285d36f05fc3982644 (diff)
downloadbitbake-contrib-9fe314b8b86d3e8be442140a338663f926bd3769.tar.gz
[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.
Diffstat (limited to 'lib/bb/parse/__init__.py')
-rw-r--r--lib/bb/parse/__init__.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/bb/parse/__init__.py b/lib/bb/parse/__init__.py
index c6a925c7a..f97233fc2 100644
--- a/lib/bb/parse/__init__.py
+++ b/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):