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

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

Issue 2965393002: Use FastaMessage instead of String. Part 1. (Closed)
Patch Set: Add type variable to Code. Created 3 years, 5 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/parser/parser.dart ('k') | pkg/front_end/lib/src/fasta/scanner/recover.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/fasta/scanner/error_token.dart
diff --git a/pkg/front_end/lib/src/fasta/scanner/error_token.dart b/pkg/front_end/lib/src/fasta/scanner/error_token.dart
index 041b3de03f0c57898aec3c649bc98c9c9cf6fef7..358b40625bb84030ee7ca3832dcdefb69a21535d 100644
--- a/pkg/front_end/lib/src/fasta/scanner/error_token.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/error_token.dart
@@ -8,7 +8,7 @@ import '../../scanner/token.dart' show BeginToken, TokenType, TokenWithComment;
import '../fasta_codes.dart'
show
- FastaCode,
+ Code,
codeAsciiControlCharacter,
codeEncoding,
codeExpectedHexDigit,
@@ -77,7 +77,7 @@ abstract class ErrorToken extends TokenWithComment {
String get assertionMessage;
- FastaCode get errorCode;
+ Code get errorCode;
int get character => null;
@@ -101,7 +101,7 @@ class EncodingErrorToken extends ErrorToken {
String get assertionMessage => "Unable to decode bytes as UTF-8.";
- FastaCode get errorCode => codeEncoding;
+ Code get errorCode => codeEncoding;
}
/// Represents a non-ASCII character outside a string or comment.
@@ -123,7 +123,7 @@ class NonAsciiIdentifierToken extends ErrorToken {
" or '\$' (a dollar sign).";
}
- FastaCode get errorCode => codeNonAsciiIdentifier;
+ Code get errorCode => codeNonAsciiIdentifier;
}
/// Represents a non-ASCII whitespace outside a string or comment.
@@ -140,7 +140,7 @@ class NonAsciiWhitespaceToken extends ErrorToken {
"and comments.";
}
- FastaCode get errorCode => codeNonAsciiWhitespace;
+ Code get errorCode => codeNonAsciiWhitespace;
}
/// Represents an ASCII control character outside a string or comment.
@@ -158,7 +158,7 @@ class AsciiControlCharacterToken extends ErrorToken {
"comments.";
}
- FastaCode get errorCode => codeAsciiControlCharacter;
+ Code get errorCode => codeAsciiControlCharacter;
}
/// Represents an unterminated string.
@@ -175,7 +175,7 @@ class UnterminatedToken extends ErrorToken {
int get charCount => endOffset - charOffset;
- FastaCode get errorCode {
+ Code get errorCode {
switch (start) {
case '1e':
return codeMissingExponent;
@@ -220,5 +220,5 @@ class UnmatchedToken extends ErrorToken {
String get assertionMessage => "'$begin' isn't closed.";
- FastaCode get errorCode => codeUnmatchedToken;
+ Code get errorCode => codeUnmatchedToken;
}
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/parser.dart ('k') | pkg/front_end/lib/src/fasta/scanner/recover.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698