shithub: mc

Download patch

ref: 987d3f2938a42db4285417109fed8d4a82655676
parent: 09600737acb8ce303be5af4b7fdf944e819b8558
author: Ori Bernstein <ori@eigenstate.org>
date: Sat Sep 2 11:50:36 EDT 2017

'in' is now a warning.

--- a/parse/gram.y
+++ b/parse/gram.y
@@ -947,8 +947,10 @@
 
 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 {