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

Side by Side Diff: pkg/analyzer/lib/src/dart/scanner/scanner.dart

Issue 2872453004: cleanup TokenType var names (Closed)
Patch Set: Created 3 years, 7 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/analyzer/lib/src/fasta/ast_builder.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 analyzer.src.dart.scanner.scanner; 5 library analyzer.src.dart.scanner.scanner;
6 6
7 import 'package:analyzer/error/error.dart'; 7 import 'package:analyzer/error/error.dart';
8 import 'package:analyzer/error/listener.dart'; 8 import 'package:analyzer/error/listener.dart';
9 import 'package:analyzer/src/dart/error/syntactic_errors.dart'; 9 import 'package:analyzer/src/dart/error/syntactic_errors.dart';
10 import 'package:analyzer/src/dart/scanner/reader.dart'; 10 import 'package:analyzer/src/dart/scanner/reader.dart';
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 throw 'No generic method comment support in Fasta'; 148 throw 'No generic method comment support in Fasta';
149 } 149 }
150 fasta.ScannerResult result = 150 fasta.ScannerResult result =
151 fasta.scanString(_contents, includeComments: _preserveComments); 151 fasta.scanString(_contents, includeComments: _preserveComments);
152 // fasta pretends there is an additional line at EOF 152 // fasta pretends there is an additional line at EOF
153 lineStarts 153 lineStarts
154 .addAll(result.lineStarts.sublist(1, result.lineStarts.length - 1)); 154 .addAll(result.lineStarts.sublist(1, result.lineStarts.length - 1));
155 fasta.Token token = result.tokens; 155 fasta.Token token = result.tokens;
156 // The default recovery strategy used by scanString 156 // The default recovery strategy used by scanString
157 // places all error tokens at the head of the stream. 157 // places all error tokens at the head of the stream.
158 while (token.info == TokenType.BAD_INPUT) { 158 while (token.type == TokenType.BAD_INPUT) {
159 translateErrorToken(token, reportError); 159 translateErrorToken(token, reportError);
160 token = token.next; 160 token = token.next;
161 } 161 }
162 firstToken = token; 162 firstToken = token;
163 return firstToken; 163 return firstToken;
164 } 164 }
165 165
166 @override 166 @override
167 set preserveComments(bool preserveComments) { 167 set preserveComments(bool preserveComments) {
168 this._preserveComments = preserveComments; 168 this._preserveComments = preserveComments;
169 } 169 }
170 } 170 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/fasta/ast_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698