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

Unified Diff: pkg/front_end/lib/src/scanner/scanner.dart

Issue 2899043006: cleanup fasta token classes (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/stack_listener.dart ('k') | pkg/front_end/lib/src/scanner/token.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/scanner/scanner.dart
diff --git a/pkg/front_end/lib/src/scanner/scanner.dart b/pkg/front_end/lib/src/scanner/scanner.dart
index 28590b40472762c8ef04898c5092ebce6a97ccd2..f2c8e3b001224c418f4f30b0fbcac38c92549003 100644
--- a/pkg/front_end/lib/src/scanner/scanner.dart
+++ b/pkg/front_end/lib/src/scanner/scanner.dart
@@ -209,8 +209,7 @@ abstract class Scanner {
* character [_reader].
*/
Scanner.create(this._reader) {
- _tokens = new Token(TokenType.EOF, -1);
- _tokens.setNext(_tokens);
+ _tokens = new Token.eof(-1);
_tail = _tokens;
_tokenStart = -1;
_lineStarts.add(0);
@@ -545,10 +544,9 @@ abstract class Scanner {
void _appendEofToken() {
Token eofToken;
if (_firstComment == null) {
- eofToken = new Token(TokenType.EOF, _reader.offset + 1);
+ eofToken = new Token.eof(_reader.offset + 1);
} else {
- eofToken = new TokenWithComment(
- TokenType.EOF, _reader.offset + 1, _firstComment);
+ eofToken = new Token.eof(_reader.offset + 1, _firstComment);
_firstComment = null;
_lastComment = null;
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/source/stack_listener.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