aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mparser.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/mparser.py')
-rw-r--r--mesonbuild/mparser.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/mparser.py b/mesonbuild/mparser.py
index 84b686e..ad871f0 100644
--- a/mesonbuild/mparser.py
+++ b/mesonbuild/mparser.py
@@ -232,6 +232,11 @@ class BaseNode:
self.end_lineno = end_lineno if end_lineno is not None else self.lineno
self.end_colno = end_colno if end_colno is not None else self.colno
+ # Attributes for the visitors
+ self.level = 0 # type: int
+ self.ast_id = '' # type: str
+ self.condition_level = 0 # type: int
+
def accept(self, visitor: 'AstVisitor') -> None:
fname = 'visit_{}'.format(type(self).__name__)
if hasattr(visitor, fname):