diff options
author | Holger Freyther <ich@tamarin.(none)> | 2009-05-18 19:24:07 +0200 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-02-15 17:06:50 +0000 |
commit | 4b25b519ae46b283988a1847e56a19b01269b3a4 (patch) | |
tree | 00392d149975e64e1c685f7621844b2cc00a8792 /bitbake/lib/bb/parse/__init__.py | |
parent | 5bac3403d7e51f72ee16c8123c2c8607a1d93ca9 (diff) | |
download | poky-4b25b519ae46b283988a1847e56a19b01269b3a4.tar.gz |
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 <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/parse/__init__.py')
-rw-r--r-- | bitbake/lib/bb/parse/__init__.py | 8 |
1 files changed, 6 insertions, 2 deletions
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): | |||
68 | return 1 | 68 | return 1 |
69 | return 0 | 69 | return 0 |
70 | 70 | ||
71 | def handle(fn, data, include = 0): | 71 | def handle(fn, data, include = 0, statements = None): |
72 | """Call the handler that is appropriate for this file""" | 72 | """Call the handler that is appropriate for this file""" |
73 | if not statements: | ||
74 | import ast | ||
75 | statements = ast.StatementGroup() | ||
76 | |||
73 | for h in handlers: | 77 | for h in handlers: |
74 | if h['supports'](fn, data): | 78 | if h['supports'](fn, data): |
75 | return h['handle'](fn, data, include) | 79 | return h['handle'](fn, data, include, statements) |
76 | raise ParseError("%s is not a BitBake file" % fn) | 80 | raise ParseError("%s is not a BitBake file" % fn) |
77 | 81 | ||
78 | def init(fn, data): | 82 | def init(fn, data): |