summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@markovcorp.com>2017-07-17 13:01:41 -0700
committerOri Bernstein <ori@markovcorp.com>2017-07-17 13:01:41 -0700
commit11f79ed8ff75049f6b1866d70bc032c8d18b1463 (patch)
tree86cd89409eb70ce6158b99d6840f6c70886b4cc7
parent23626785a460ead2c439e2b73209b9b1dc83d552 (diff)
downloadmc-11f79ed8ff75049f6b1866d70bc032c8d18b1463.tar.gz
Start migrating code to use `for x : iterable`.
`in` is too good of a variable name to waste on a loop iterator specifier.
-rw-r--r--parse/gram.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse/gram.y b/parse/gram.y
index 5ebfebb..02b3399 100644
--- a/parse/gram.y
+++ b/parse/gram.y
@@ -944,6 +944,8 @@ forstmt : Tfor optexprln loopcond optexprln block
{$$ = mkloopstmt($1->loc, $2, $3, $4, $5);}
| Tfor expr Tin exprln block
{$$ = mkiterstmt($1->loc, $2, $4, $5);}
+ | Tfor expr Tcolon exprln block
+ {$$ = mkiterstmt($1->loc, $2, $4, $5);}
| Tfor decl Tendln loopcond optexprln block {
//Node *init;
if ($2.nn != 1)