aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/ast/introspection.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/ast/introspection.py')
-rw-r--r--mesonbuild/ast/introspection.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py
index 5d0ec5a..0a4d73a 100644
--- a/mesonbuild/ast/introspection.py
+++ b/mesonbuild/ast/introspection.py
@@ -51,6 +51,7 @@ class IntrospectionInterpreter(AstInterpreter):
self.default_options = {'backend': self.backend}
self.project_data = {}
self.targets = []
+ self.project_node = None
self.funcs.update({
'add_languages': self.func_add_languages,
@@ -65,6 +66,9 @@ class IntrospectionInterpreter(AstInterpreter):
})
def func_project(self, node, args, kwargs):
+ if self.project_node:
+ raise InvalidArguments('Second call to project()')
+ self.project_node = node
if len(args) < 1:
raise InvalidArguments('Not enough arguments to project(). Needs at least the project name.')