aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/script/script.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-09-23 20:08:47 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-09-28 19:07:50 +0300
commit1c60c97b6b05cbee7e106fae6d8582382cbe4b7c (patch)
treeee389ea12fbe0dcecd39c32fd39fcb6c754af45a /libbuild2/script/script.cxx
parent744e8215261fbf81b9348d115d4916a9c88b52cc (diff)
Add support for 'for' loop first form (for x:...) in script
Diffstat (limited to 'libbuild2/script/script.cxx')
-rw-r--r--libbuild2/script/script.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/libbuild2/script/script.cxx b/libbuild2/script/script.cxx
index d4096cf..33c4c30 100644
--- a/libbuild2/script/script.cxx
+++ b/libbuild2/script/script.cxx
@@ -28,6 +28,7 @@ namespace build2
case line_type::cmd_elifn: s = "'elif!'"; break;
case line_type::cmd_else: s = "'else'"; break;
case line_type::cmd_while: s = "'while'"; break;
+ case line_type::cmd_for: s = "'for'"; break;
case line_type::cmd_end: s = "'end'"; break;
}
@@ -225,7 +226,8 @@ namespace build2
case line_type::cmd_elif:
case line_type::cmd_elifn:
case line_type::cmd_else:
- case line_type::cmd_while: fc_ind += " "; break;
+ case line_type::cmd_while:
+ case line_type::cmd_for: fc_ind += " "; break;
default: break;
}