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

Side by Side Diff: pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.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
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 import 'package:front_end/src/fasta/errors.dart'; 5 import 'package:front_end/src/fasta/errors.dart';
6 import 'package:front_end/src/fasta/scanner/precedence.dart';
7 import 'package:front_end/src/fasta/scanner/token.dart'; 6 import 'package:front_end/src/fasta/scanner/token.dart';
8 7
9 /// Provides the capability of inserting tokens into a token stream by rewriting 8 /// Provides the capability of inserting tokens into a token stream by rewriting
10 /// the previous token to point to the inserted token. 9 /// the previous token to point to the inserted token.
11 /// 10 ///
12 /// This class has been designed to take advantage of "previousToken" pointers 11 /// This class has been designed to take advantage of "previousToken" pointers
13 /// when they are present, but not to depend on them. When they are not 12 /// when they are present, but not to depend on them. When they are not
14 /// present, it uses heuristics to try to find the find the previous token as 13 /// present, it uses heuristics to try to find the find the previous token as
15 /// quickly as possible by walking through tokens starting at the start of the 14 /// quickly as possible by walking through tokens starting at the start of the
16 /// file. 15 /// file.
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 nextPos = pos.next; 96 nextPos = pos.next;
98 if (nextPos == null || nextPos.charOffset > target.charOffset) { 97 if (nextPos == null || nextPos.charOffset > target.charOffset) {
99 return null; 98 return null;
100 } 99 }
101 } 100 }
102 pos = nextPos; 101 pos = nextPos;
103 } 102 }
104 return pos; 103 return pos;
105 } 104 }
106 } 105 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/fasta_accessors.dart ('k') | pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698