| OLD | NEW |
| 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 import '../../scanner/token.dart' show TokenType; | 7 import '../../scanner/token.dart' show TokenType; |
| 8 | 8 |
| 9 import '../fasta_codes.dart' | 9 import '../fasta_codes.dart' |
| 10 show | 10 show |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 /// | 66 /// |
| 67 /// It's considered an implementation error to access [lexeme] of an | 67 /// It's considered an implementation error to access [lexeme] of an |
| 68 /// [ErrorToken]. | 68 /// [ErrorToken]. |
| 69 abstract class ErrorToken extends Token { | 69 abstract class ErrorToken extends Token { |
| 70 ErrorToken(int charOffset) : super(charOffset); | 70 ErrorToken(int charOffset) : super(charOffset); |
| 71 | 71 |
| 72 TokenType get type => TokenType.BAD_INPUT; | 72 TokenType get type => TokenType.BAD_INPUT; |
| 73 | 73 |
| 74 String get lexeme => throw assertionMessage; | 74 String get lexeme => throw assertionMessage; |
| 75 | 75 |
| 76 String get stringValue => null; | |
| 77 | |
| 78 bool get isIdentifier => false; | 76 bool get isIdentifier => false; |
| 79 | 77 |
| 80 String get assertionMessage; | 78 String get assertionMessage; |
| 81 | 79 |
| 82 FastaCode get errorCode; | 80 FastaCode get errorCode; |
| 83 | 81 |
| 84 int get character => null; | 82 int get character => null; |
| 85 | 83 |
| 86 String get start => null; | 84 String get start => null; |
| 87 | 85 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 UnmatchedToken(BeginGroupToken begin) | 215 UnmatchedToken(BeginGroupToken begin) |
| 218 : this.begin = begin, | 216 : this.begin = begin, |
| 219 super(begin.charOffset); | 217 super(begin.charOffset); |
| 220 | 218 |
| 221 String toString() => "UnmatchedToken(${begin.lexeme})"; | 219 String toString() => "UnmatchedToken(${begin.lexeme})"; |
| 222 | 220 |
| 223 String get assertionMessage => "'$begin' isn't closed."; | 221 String get assertionMessage => "'$begin' isn't closed."; |
| 224 | 222 |
| 225 FastaCode get errorCode => codeUnmatchedToken; | 223 FastaCode get errorCode => codeUnmatchedToken; |
| 226 } | 224 } |
| OLD | NEW |