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

Unified Diff: pkg/front_end/lib/src/fasta/quote.dart

Issue 2970273004: Deprecate all diagnostics methods that use strings. (Closed)
Patch Set: Merged with 4df146dd9a465d63344330bf3e45524b927c92ec 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/token_stream_rewriter.dart ('k') | pkg/front_end/lib/src/fasta/run.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/quote.dart
diff --git a/pkg/front_end/lib/src/fasta/quote.dart b/pkg/front_end/lib/src/fasta/quote.dart
index 168612ef0c079a0f51b26eafc028c7d2801fc57f..a044216622cfef7d68bd532ee8930763894d16b1 100644
--- a/pkg/front_end/lib/src/fasta/quote.dart
+++ b/pkg/front_end/lib/src/fasta/quote.dart
@@ -4,7 +4,8 @@
library fasta.quote;
-import 'errors.dart' show inputError, internalError;
+import 'deprecated_problems.dart'
+ show deprecated_inputError, deprecated_internalProblem;
import 'scanner/characters.dart'
show
@@ -49,7 +50,7 @@ Quote analyzeQuote(String first) {
if (first.startsWith('r"')) return Quote.RawDouble;
if (first.startsWith("'")) return Quote.Single;
if (first.startsWith("r'")) return Quote.RawSingle;
- return internalError("Unexpected string literal: $first");
+ return deprecated_internalProblem("Unexpected string literal: $first");
}
// Note: based on [StringValidator.quotingFromString]
@@ -99,7 +100,7 @@ int firstQuoteLength(String first, Quote quote) {
case Quote.RawMultiLineDouble:
return lengthOfOptionalWhitespacePrefix(first, 4);
}
- return internalError("Unhandled string quote: $quote");
+ return deprecated_internalProblem("Unhandled string quote: $quote");
}
int lastQuoteLength(Quote quote) {
@@ -116,7 +117,7 @@ int lastQuoteLength(Quote quote) {
case Quote.RawMultiLineDouble:
return 3;
}
- return internalError("Unhandled string quote: $quote");
+ return deprecated_internalProblem("Unhandled string quote: $quote");
}
String unescapeFirstStringPart(String first, Quote quote) {
@@ -160,7 +161,8 @@ String unescape(String string, Quote quote) {
? string
: unescapeCodeUnits(string.codeUnits, true);
}
- return internalError("Internal error: Unexpected quote: $quote.");
+ return deprecated_internalProblem(
+ "Internal error: Unexpected quote: $quote.");
}
const String incompleteSequence = "Incomplete escape sequence.";
@@ -176,7 +178,7 @@ String unescapeCodeUnits(List<int> codeUnits, bool isRaw) {
List<int> result = new List<int>(codeUnits.length);
int resultOffset = 0;
error(int offset, String message) {
- inputError(null, null, message);
+ deprecated_inputError(null, null, message);
}
for (int i = 0; i < codeUnits.length; i++) {
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/token_stream_rewriter.dart ('k') | pkg/front_end/lib/src/fasta/run.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698