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

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

Issue 2757113002: fasta.Token implement analyzer.Token (Closed)
Patch Set: rebase 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 licenset hat can be found in the LICENSE file. 3 // BSD-style licenset hat can be found in the LICENSE file.
4 4
5 library dart_scanner.error_token; 5 library dart_scanner.error_token;
6 6
7 // TODO(ahe): ErrorKind doesn't belong in dart_parser. Move to compiler_util or 7 // TODO(ahe): ErrorKind doesn't belong in dart_parser. Move to compiler_util or
8 // this package? 8 // this package?
9 import '../parser/error_kind.dart' show ErrorKind; 9 import '../parser/error_kind.dart' show ErrorKind;
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 ErrorKind get errorCode; 73 ErrorKind get errorCode;
74 74
75 int get character => null; 75 int get character => null;
76 76
77 String get start => null; 77 String get start => null;
78 78
79 int get endOffset => null; 79 int get endOffset => null;
80 80
81 BeginGroupToken get begin => null; 81 BeginGroupToken get begin => null;
82
83 @override
84 Token copyWithoutComments() {
85 throw 'unsupported operation';
ahe 2017/03/20 12:32:48 import '../errors.dart'; internalError("Unsupport
86 }
82 } 87 }
83 88
84 /// Represents an encoding error. 89 /// Represents an encoding error.
85 class EncodingErrorToken extends ErrorToken { 90 class EncodingErrorToken extends ErrorToken {
86 EncodingErrorToken(int charOffset) : super(charOffset); 91 EncodingErrorToken(int charOffset) : super(charOffset);
87 92
88 String toString() => "EncodingErrorToken()"; 93 String toString() => "EncodingErrorToken()";
89 94
90 String get assertionMessage => "Unable to decode bytes as UTF-8."; 95 String get assertionMessage => "Unable to decode bytes as UTF-8.";
91 96
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 UnmatchedToken(BeginGroupToken begin) 208 UnmatchedToken(BeginGroupToken begin)
204 : this.begin = begin, 209 : this.begin = begin,
205 super(begin.charOffset); 210 super(begin.charOffset);
206 211
207 String toString() => "UnmatchedToken(${begin.lexeme})"; 212 String toString() => "UnmatchedToken(${begin.lexeme})";
208 213
209 String get assertionMessage => "'$begin' isn't closed."; 214 String get assertionMessage => "'$begin' isn't closed.";
210 215
211 ErrorKind get errorCode => ErrorKind.UnmatchedToken; 216 ErrorKind get errorCode => ErrorKind.UnmatchedToken;
212 } 217 }
OLDNEW
« no previous file with comments | « no previous file | pkg/front_end/lib/src/fasta/scanner/token.dart » ('j') | pkg/front_end/lib/src/fasta/scanner/token.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698