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

Unified Diff: pkg/compiler/lib/src/io/code_output.dart

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
Index: pkg/compiler/lib/src/io/code_output.dart
diff --git a/pkg/compiler/lib/src/io/code_output.dart b/pkg/compiler/lib/src/io/code_output.dart
index 7f5b99676b9e7374855f5ff248e2c4044ecc79f3..e43cbbbfa4cf0c115b574edd5d0bf7968fdf70b7 100644
--- a/pkg/compiler/lib/src/io/code_output.dart
+++ b/pkg/compiler/lib/src/io/code_output.dart
@@ -23,8 +23,8 @@ abstract class SourceLocations {
void addSourceLocation(int targetOffset, SourceLocation sourcePosition);
/// Applies [f] to every target offset and associated source location.
- void forEachSourceLocation(void f(int targetOffset,
- SourceLocation sourceLocation));
+ void forEachSourceLocation(
+ void f(int targetOffset, SourceLocation sourceLocation));
}
abstract class CodeOutput implements SourceLocations {
@@ -66,9 +66,10 @@ abstract class AbstractCodeOutput extends CodeOutput {
@override
void addBuffer(CodeBuffer other) {
if (other.markers.length > 0) {
- other.markers.forEach(
- (int targetOffset, List<SourceLocation> sourceLocations) {
- markers.putIfAbsent(length + targetOffset, () => <SourceLocation>[])
+ other.markers
+ .forEach((int targetOffset, List<SourceLocation> sourceLocations) {
+ markers
+ .putIfAbsent(length + targetOffset, () => <SourceLocation>[])
.addAll(sourceLocations);
});
}
@@ -78,8 +79,7 @@ abstract class AbstractCodeOutput extends CodeOutput {
_addInternal(other.getText());
}
- void addSourceLocation(int targetOffset,
- SourceLocation sourceLocation) {
+ void addSourceLocation(int targetOffset, SourceLocation sourceLocation) {
assert(targetOffset <= length);
List<SourceLocation> sourceLocations =
markers.putIfAbsent(targetOffset, () => <SourceLocation>[]);
« no previous file with comments | « pkg/compiler/lib/src/info/trusted_types_analysis_result.dart ('k') | pkg/compiler/lib/src/io/position_information.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698