]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
[parse] Move the last method to the AST...
authorHolger Freyther <ich@tamarin.(none)>
Tue, 19 May 2009 08:57:00 +0000 (10:57 +0200)
committerRichard Purdie <rpurdie@linux.intel.com>
Fri, 12 Feb 2010 17:59:16 +0000 (17:59 +0000)
lib/bb/parse/ast.py

index f5974f40d29090306a3c656e07232cdf40648739..ed9c689afa9602321c6ec9e6515f8c3f71deb75a 100644 (file)
@@ -250,6 +250,14 @@ class BBHandlerNode:
             bbhands.append(h)
             bb.data.setVarFlag(h, "handler", 1, data)
         bb.data.setVar('__BBHANDLERS', bbhands, data)
+
+class InheritNode:
+    def __init__(self, files):
+        self.n = __word__.findall(files)
+
+    def eval(self, data):
+        statements = StatementGroup()
+        bb.parse.BBHandler.inherit(statements, self.n, data)
  
 def handleInclude(statements, m, fn, lineno, data, force):
     # AST handling
@@ -301,7 +309,8 @@ def handleBBHandlers(statements, m, d):
 def handleInherit(statements, m, d):
     files = m.group(1)
     n = __word__.findall(files)
-    bb.parse.BBHandler.inherit(statements, n, d)
+    statements.append(InheritNode(m.group(1)))
+    statements[-1].eval(d)
 
 def finalise(fn, d):
     bb.data.expandKeys(d)