@@ -337,7 +337,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer
337337 auto next = peek(t);
338338 if (next.value != TOK .leftParenthesis)
339339 return false ;
340- if (compileEnv.tuples && isTupleNotation(next))
340+ if (isTupleNotation(next))
341341 return false ;
342342 return true ;
343343 }
@@ -845,7 +845,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer
845845 {
846846 auto next = peek(&token);
847847 if (next.value != TOK .leftParenthesis ||
848- compileEnv.tuples && peekPastParen(next).value == TOK .assign)
848+ peekPastParen(next).value == TOK .assign)
849849 {
850850 stc = STC .extern_;
851851 goto Lstc;
@@ -1098,7 +1098,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer
10981098
10991099 case TOK .leftParenthesis:
11001100 // confirm unpacking for better error messages:
1101- if (compileEnv.tuples && peekPastParen(&token).value == TOK .assign)
1101+ if (peekPastParen(&token).value == TOK .assign)
11021102 goto Ldeclaration;
11031103 goto default ;
11041104
@@ -1288,7 +1288,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer
12881288 * Parse auto declarations of the form:
12891289 * storageClass ident = init, ident = init, ... ;
12901290 * and return the array of them.
1291- * Starts with token on the first ident, or '(' with -preview=tuples.
1291+ * Starts with token on the first ident, or '('
12921292 * Ends with scanner past closing ';'
12931293 */
12941294 private AST .Dsymbols* parseAutoDeclarations (STC storageClass, const (char )* comment)
@@ -1302,7 +1302,6 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer
13021302 AST .Dsymbol s;
13031303 if (token.value == TOK .leftParenthesis)
13041304 {
1305- assert (compileEnv.tuples);
13061305 s = parseUnpackDeclaration(storageClass, true );
13071306 if (! storageClass && token.value == TOK .comma)
13081307 {
@@ -3239,7 +3238,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer
32393238 if (tpl && ! * tpl && hasAutoRefParam)
32403239 * tpl = new AST .TemplateParameters();
32413240
3242- if (compileEnv.tuples && tpl && token.value == TOK .leftParenthesis)
3241+ if (tpl && token.value == TOK .leftParenthesis)
32433242 {
32443243 const tv2 = peekPastParen(&token).value;
32453244 if (tv2 == TOK .comma || tv2 == TOK .rightParenthesis || tv2 == TOK .dotDotDot)
@@ -4643,7 +4642,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer
46434642 {
46444643 auto next = peek(&token);
46454644 if (next.value != TOK .leftParenthesis ||
4646- compileEnv.tuples && peekPastParen(next).value == TOK .assign)
4645+ peekPastParen(next).value == TOK .assign)
46474646 {
46484647 stc = STC .extern_;
46494648 goto L1 ;
@@ -4804,7 +4803,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer
48044803 * (int x, auto y) = initializer;
48054804 * storage_class (a, b, ...) = initializer;
48064805 */
4807- if (compileEnv.tuples && token.value == TOK .leftParenthesis &&
4806+ if (token.value == TOK .leftParenthesis &&
48084807 isTupleNotation(&token))
48094808 {
48104809 // TODO: can we merge this with the branch below?
@@ -5962,7 +5961,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer
59625961 goto Larg;
59635962 }
59645963 }
5965- else if (compileEnv.tuples && token.value == TOK .leftParenthesis)
5964+ else if (token.value == TOK .leftParenthesis)
59665965 {
59675966 TOK after = peekPastParen(&token).value;
59685967 if (after == TOK .comma || after == TOK .semicolon)
@@ -6670,7 +6669,7 @@ class Parser(AST, Lexer = dmd.lexer.Lexer) : Lexer
66706669 case TOK .scope_:
66716670 auto next = peek(&token);
66726671 if (next.value != TOK .leftParenthesis ||
6673- compileEnv.tuples && peekPastParen(next).value == TOK .assign)
6672+ peekPastParen(next).value == TOK .assign)
66746673 goto Ldeclaration; // scope used as storage class
66756674 nextToken();
66766675 check(TOK .leftParenthesis);
0 commit comments