aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/ast/introspection.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-02-19 00:08:58 +0200
committerGitHub <noreply@github.com>2019-02-19 00:08:58 +0200
commit6e15bcc5045b6092a27b83e402007c9beca27abb (patch)
tree72521f7d1a5099cb7d6f0d20f65bbb27166b219c /mesonbuild/ast/introspection.py
parenta9e63568fe4a1ef420cdb8bacb85fbf6d621dc0d (diff)
parent4b7b5a718550808f9880f864126120cbbadf40ea (diff)
downloadmeson-6e15bcc5045b6092a27b83e402007c9beca27abb.zip
meson-6e15bcc5045b6092a27b83e402007c9beca27abb.tar.gz
meson-6e15bcc5045b6092a27b83e402007c9beca27abb.tar.bz2
Merge pull request #4929 from mensinda/rwAddRmTgt
rewriter: Add and remove targets
Diffstat (limited to 'mesonbuild/ast/introspection.py')
-rw-r--r--mesonbuild/ast/introspection.py10
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))