aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/build/script/parser.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/build/script/parser.hxx')
-rw-r--r--libbuild2/build/script/parser.hxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/libbuild2/build/script/parser.hxx b/libbuild2/build/script/parser.hxx
index a652cf4..73bcd09 100644
--- a/libbuild2/build/script/parser.hxx
+++ b/libbuild2/build/script/parser.hxx
@@ -181,6 +181,16 @@ namespace build2
//
line* save_line_;
+ // The if-else nesting level (and in the future for other flow
+ // control constructs).
+ //
+ // Maintained during pre-parsing and is incremented when the cmd_if or
+ // cmd_ifn lines are encountered, which in particular means that it is
+ // already incremented by the time the if-condition expression is
+ // pre-parsed. Decremented when the cmd_end line is encountered.
+ //
+ size_t level_ = 0;
+
// Execute state.
//
runner* runner_;