summaryrefslogtreecommitdiff
path: root/parse
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2017-09-02 15:50:36 -0700
committerOri Bernstein <ori@eigenstate.org>2017-09-02 15:50:36 -0700
commit987d3f2938a42db4285417109fed8d4a82655676 (patch)
tree987eed2312f9d76f7eb8a587b9afa6316df91dba /parse
parent09600737acb8ce303be5af4b7fdf944e819b8558 (diff)
downloadmc-987d3f2938a42db4285417109fed8d4a82655676.tar.gz
'in' is now a warning.
Diffstat (limited to 'parse')
-rw-r--r--parse/gram.y6
1 files changed, 4 insertions, 2 deletions
diff --git a/parse/gram.y b/parse/gram.y
index 424538e..9dc198d 100644
--- a/parse/gram.y
+++ b/parse/gram.y
@@ -947,8 +947,10 @@ continue : Tcontinue
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 Tin exprln block {
+ $$ = mkiterstmt($1->loc, $2, $4, $5);
+ fprintf(stderr, "%s:%d: deprecated for syntax. use ':' to replace 'in'\n", fname($1->loc), lnum($1->loc));
+ }
| Tfor expr Tcolon exprln block
{$$ = mkiterstmt($1->loc, $2, $4, $5);}
| Tfor decl Tendln loopcond optexprln block {