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

Side by Side Diff: pkg/front_end/lib/src/scanner/errors.dart

Issue 2890523002: merge fasta.Token into analyzer.Token (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
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 import 'package:front_end/src/base/errors.dart'; 5 import 'package:front_end/src/base/errors.dart';
6 import 'package:front_end/src/fasta/fasta_codes.dart'; 6 import 'package:front_end/src/fasta/fasta_codes.dart';
7 import 'package:front_end/src/fasta/scanner/error_token.dart'; 7 import 'package:front_end/src/fasta/scanner/error_token.dart';
8 import 'package:front_end/src/fasta/scanner/token.dart'; 8 import 'package:front_end/src/scanner/token.dart' show Token;
9 import 'package:front_end/src/fasta/scanner/token_constants.dart'; 9 import 'package:front_end/src/fasta/scanner/token_constants.dart';
10 10
11 /** 11 /**
12 * The error codes used for errors detected by the scanner. 12 * The error codes used for errors detected by the scanner.
13 */ 13 */
14 class ScannerErrorCode extends ErrorCode { 14 class ScannerErrorCode extends ErrorCode {
15 /** 15 /**
16 * Parameters: 16 * Parameters:
17 * 0: the illegal character 17 * 0: the illegal character
18 */ 18 */
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 token = token.next; 137 token = token.next;
138 // If we've found an EOF token, its charOffset indicates where the end of 138 // If we've found an EOF token, its charOffset indicates where the end of
139 // the input is. 139 // the input is.
140 if (token.isEof) return token.charOffset == charOffset; 140 if (token.isEof) return token.charOffset == charOffset;
141 // If we've found a non-error token, then we know there is additional input 141 // If we've found a non-error token, then we know there is additional input
142 // text after [charOffset]. 142 // text after [charOffset].
143 if (token.type.kind != BAD_INPUT_TOKEN) return false; 143 if (token.type.kind != BAD_INPUT_TOKEN) return false;
144 // Otherwise keep looking. 144 // Otherwise keep looking.
145 } 145 }
146 } 146 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/target_implementation.dart ('k') | pkg/front_end/lib/src/scanner/token.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698