diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-02-14 12:48:53 +0100 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2019-02-16 14:10:08 +0100 |
commit | 24a2cf02e26aaeaa726b23354711c2d664286d20 (patch) | |
tree | a66f4abd6e34de3f17b56dbcaa69673d493f290f /mesonbuild/ast/introspection.py | |
parent | 683c768feddcf074c86eb09e810495eacf8a187a (diff) | |
download | meson-24a2cf02e26aaeaa726b23354711c2d664286d20.zip meson-24a2cf02e26aaeaa726b23354711c2d664286d20.tar.gz meson-24a2cf02e26aaeaa726b23354711c2d664286d20.tar.bz2 |
Can now find the assignment node of a value
Diffstat (limited to 'mesonbuild/ast/introspection.py')
-rw-r--r-- | mesonbuild/ast/introspection.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py index b6a523b..0917015 100644 --- a/mesonbuild/ast/introspection.py +++ b/mesonbuild/ast/introspection.py @@ -34,8 +34,8 @@ class IntrospectionHelper: class IntrospectionInterpreter(AstInterpreter): # Interpreter to detect the options without a build directory # Most of the code is stolen from interperter.Interpreter - def __init__(self, source_root, subdir, backend, cross_file=None, subproject='', subproject_dir='subprojects', env=None): - super().__init__(source_root, subdir) + def __init__(self, source_root, subdir, backend, visitors=[], cross_file=None, subproject='', subproject_dir='subprojects', env=None): + super().__init__(source_root, subdir, visitors=visitors) options = IntrospectionHelper(cross_file) self.cross_file = cross_file @@ -162,9 +162,9 @@ class IntrospectionInterpreter(AstInterpreter): # Try to resolve the ID and append the node to the queue id = curr.value if id in self.assignments and self.assignments[id]: - node = self.assignments[id][0] - if isinstance(node, (mparser.ArrayNode, mparser.IdNode, mparser.FunctionNode)): - srcqueue += [node] + tmp_node = self.assignments[id][0] + if isinstance(tmp_node, (mparser.ArrayNode, mparser.IdNode, mparser.FunctionNode)): + srcqueue += [tmp_node] if arg_node is None: continue elemetary_nodes = list(filter(lambda x: isinstance(x, (str, mparser.StringNode)), arg_node.arguments)) |