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

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

Issue 2718113003: Run dartfmt on pkg/front_end/lib. (Closed)
Patch Set: Rerun after merging. Created 3 years, 10 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/top_level_parser.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 14c6dca32a48d1a36364b2410181b0d7287b0480..abdf660e92b195f93f7ae37e443e60844c54649a 100644
--- a/pkg/front_end/lib/src/fasta/quote.dart
+++ b/pkg/front_end/lib/src/fasta/quote.dart
@@ -4,31 +4,30 @@
library fasta.quote;
-import 'errors.dart' show
- inputError,
- internalError;
-
-import 'package:front_end/src/fasta/scanner/characters.dart' show
- $BACKSLASH,
- $BS,
- $CLOSE_CURLY_BRACKET,
- $CR,
- $FF,
- $LF,
- $OPEN_CURLY_BRACKET,
- $SPACE,
- $TAB,
- $VTAB,
- $b,
- $f,
- $n,
- $r,
- $t,
- $u,
- $v,
- $x,
- hexDigitValue,
- isHexDigit;
+import 'errors.dart' show inputError, internalError;
+
+import 'package:front_end/src/fasta/scanner/characters.dart'
+ show
+ $BACKSLASH,
+ $BS,
+ $CLOSE_CURLY_BRACKET,
+ $CR,
+ $FF,
+ $LF,
+ $OPEN_CURLY_BRACKET,
+ $SPACE,
+ $TAB,
+ $VTAB,
+ $b,
+ $f,
+ $n,
+ $r,
+ $t,
+ $u,
+ $v,
+ $x,
+ hexDigitValue,
+ isHexDigit;
enum Quote {
Single,
@@ -125,14 +124,15 @@ String unescapeFirstStringPart(String first, Quote quote) {
}
String unescapeLastStringPart(String last, Quote quote) {
- return unescape(last.substring(0, last.length - lastQuoteLength(quote)),
- quote);
+ return unescape(
+ last.substring(0, last.length - lastQuoteLength(quote)), quote);
}
String unescapeString(String string) {
Quote quote = analyzeQuote(string);
- return unescape(string.substring(
- firstQuoteLength(string, quote), string.length - lastQuoteLength(quote)),
+ return unescape(
+ string.substring(firstQuoteLength(string, quote),
+ string.length - lastQuoteLength(quote)),
quote);
}
@@ -168,11 +168,13 @@ String unescapeCodeUnits(List<int> codeUnits) {
error(int offset, String message) {
inputError(null, null, message);
}
+
for (int i = 0; i < codeUnits.length; i++) {
int code = codeUnits[i];
if (code == $BACKSLASH) {
if (codeUnits.length == ++i) return error(i, incompleteSequence);
code = codeUnits[i];
+
/// `\n` for newline, equivalent to `\x0A`.
/// `\r` for carriage return, equivalent to `\x0D`.
/// `\f` for form feed, equivalent to `\x0C`.
« no previous file with comments | « pkg/front_end/lib/src/fasta/parser/top_level_parser.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