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

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

Issue 2839403004: change fasta.Token.isIdentifier() from method to getter (Closed)
Patch Set: rebase 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) 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 info => TokenType.BAD_INPUT; 72 TokenType get info => TokenType.BAD_INPUT;
73 73
74 String get lexeme => throw assertionMessage; 74 String get lexeme => throw assertionMessage;
75 75
76 String get stringValue => null; 76 String get stringValue => null;
77 77
78 bool isIdentifier() => false; 78 bool get isIdentifier => false;
79 79
80 String get assertionMessage; 80 String get assertionMessage;
81 81
82 FastaCode get errorCode; 82 FastaCode get errorCode;
83 83
84 int get character => null; 84 int get character => null;
85 85
86 String get start => null; 86 String get start => null;
87 87
88 int get endOffset => null; 88 int get endOffset => null;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 UnmatchedToken(BeginGroupToken begin) 217 UnmatchedToken(BeginGroupToken begin)
218 : this.begin = begin, 218 : this.begin = begin,
219 super(begin.charOffset); 219 super(begin.charOffset);
220 220
221 String toString() => "UnmatchedToken(${begin.lexeme})"; 221 String toString() => "UnmatchedToken(${begin.lexeme})";
222 222
223 String get assertionMessage => "'$begin' isn't closed."; 223 String get assertionMessage => "'$begin' isn't closed.";
224 224
225 FastaCode get errorCode => codeUnmatchedToken; 225 FastaCode get errorCode => codeUnmatchedToken;
226 } 226 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/parser.dart ('k') | pkg/front_end/lib/src/fasta/scanner/token.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698