| Index: pkg/front_end/lib/src/fasta/scanner/token.dart
|
| diff --git a/pkg/front_end/lib/src/fasta/scanner/token.dart b/pkg/front_end/lib/src/fasta/scanner/token.dart
|
| index 35067a2e04cce24eb47ab156400ef5d2820181a5..a380e48250348246fc5fa8e3e4407f0e68a7baf0 100644
|
| --- a/pkg/front_end/lib/src/fasta/scanner/token.dart
|
| +++ b/pkg/front_end/lib/src/fasta/scanner/token.dart
|
| @@ -16,8 +16,6 @@ import 'precedence.dart'
|
| IDENTIFIER_INFO,
|
| IS_INFO,
|
| KEYWORD_INFO,
|
| - MULTI_LINE_COMMENT_INFO,
|
| - SINGLE_LINE_COMMENT_INFO,
|
| PrecedenceInfo;
|
|
|
| import 'token_constants.dart' show IDENTIFIER_TOKEN;
|
| @@ -258,13 +256,21 @@ class SymbolToken extends Token {
|
|
|
| SymbolToken(this.info, int charOffset) : super(charOffset);
|
|
|
| + SymbolToken.eof(int charOffset)
|
| + : info = EOF_INFO,
|
| + super(charOffset) {
|
| + // EOF points to itself so there's always infinite look-ahead.
|
| + previousToken = this;
|
| + next = this;
|
| + }
|
| +
|
| String get lexeme => info.value;
|
|
|
| String get stringValue => info.value;
|
|
|
| bool isIdentifier() => false;
|
|
|
| - String toString() => "SymbolToken($lexeme)";
|
| + String toString() => "SymbolToken(${info == EOF_INFO ? '-eof-' : lexeme})";
|
|
|
| bool get isEof => info == EOF_INFO;
|
|
|
|
|