From 323e774380995c04ae705e29ae0e51d62246333d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 9 Nov 2017 17:06:35 +0200 Subject: Add support for for-loop The semantics is similar to the C++11 range-based for: list = 1 2 3 for i: $list print $i Note that there is no scoping of any kind for the loop variable ('i' in the above example). See tests/loop/for.test for some examples/ideas. In the future the plan is to also support more general while-loop as well as break and continue. --- build2/name.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build2/name.hxx') diff --git a/build2/name.hxx b/build2/name.hxx index 388415b..6f329ef 100644 --- a/build2/name.hxx +++ b/build2/name.hxx @@ -134,7 +134,7 @@ namespace build2 // Vector of names. // - // Quote often it will contain just one element so we use small_vector<1>. + // Quite often it will contain just one element so we use small_vector<1>. // Note also that it must be a separate type rather than an alias for // vector in order to distinguish between untyped variable values // (names) and typed ones (vector). -- cgit v1.1