Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(916)

Side by Side Diff: pkg/front_end/lib/src/fasta/kernel/body_builder.dart

Issue 2780483002: Complain about assignments to parenthesized expressions. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library fasta.body_builder; 5 library fasta.body_builder;
6 6
7 import '../parser/parser.dart' show FormalParameterType, optional; 7 import '../parser/parser.dart' show FormalParameterType, optional;
8 8
9 import '../parser/error_kind.dart' show ErrorKind; 9 import '../parser/error_kind.dart' show ErrorKind;
10 10
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 arguments.getRange(firstNamedArgumentIndex, arguments.length)); 481 arguments.getRange(firstNamedArgumentIndex, arguments.length));
482 push(new Arguments(positional, named: named)); 482 push(new Arguments(positional, named: named));
483 } else { 483 } else {
484 push(new Arguments(arguments)); 484 push(new Arguments(arguments));
485 } 485 }
486 } 486 }
487 487
488 @override 488 @override
489 void handleParenthesizedExpression(BeginGroupToken token) { 489 void handleParenthesizedExpression(BeginGroupToken token) {
490 debugEvent("ParenthesizedExpression"); 490 debugEvent("ParenthesizedExpression");
491 push(popForValue()); 491 push(new ParenthesizedExpression(
492 this, popForValue(), token.endGroup.charOffset));
492 } 493 }
493 494
494 @override 495 @override
495 void endSend(Token beginToken, Token endToken) { 496 void endSend(Token beginToken, Token endToken) {
496 debugEvent("Send"); 497 debugEvent("Send");
497 Arguments arguments = pop(); 498 Arguments arguments = pop();
498 List<DartType> typeArguments = pop(); 499 List<DartType> typeArguments = pop();
499 Object receiver = pop(); 500 Object receiver = pop();
500 if (arguments != null && typeArguments != null) { 501 if (arguments != null && typeArguments != null) {
501 arguments.types.addAll(typeArguments); 502 arguments.types.addAll(typeArguments);
(...skipping 2377 matching lines...) Expand 10 before | Expand all | Expand 10 after
2879 } else if (node is PrefixBuilder) { 2880 } else if (node is PrefixBuilder) {
2880 return node.name; 2881 return node.name;
2881 } else if (node is ThisAccessor) { 2882 } else if (node is ThisAccessor) {
2882 return node.isSuper ? "super" : "this"; 2883 return node.isSuper ? "super" : "this";
2883 } else if (node is FastaAccessor) { 2884 } else if (node is FastaAccessor) {
2884 return node.plainNameForRead; 2885 return node.plainNameForRead;
2885 } else { 2886 } else {
2886 return internalError("Unhandled: ${node.runtimeType}"); 2887 return internalError("Unhandled: ${node.runtimeType}");
2887 } 2888 }
2888 } 2889 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698