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

Unified Diff: pkg/compiler/lib/src/io/start_end_information.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
« no previous file with comments | « pkg/compiler/lib/src/io/source_map_builder.dart ('k') | pkg/compiler/lib/src/js/js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/io/start_end_information.dart
diff --git a/pkg/compiler/lib/src/io/start_end_information.dart b/pkg/compiler/lib/src/io/start_end_information.dart
index 8cae56666b5f960b2e1d486946d278e11719a78d..b08477fdb340441f696de9cc833e6fff92b72f07 100644
--- a/pkg/compiler/lib/src/io/start_end_information.dart
+++ b/pkg/compiler/lib/src/io/start_end_information.dart
@@ -8,11 +8,8 @@
library dart2js.source_information.start_end;
import '../common.dart';
-import '../diagnostics/messages.dart' show
- MessageTemplate;
-import '../elements/elements.dart' show
- AstElement,
- LocalElement;
+import '../diagnostics/messages.dart' show MessageTemplate;
+import '../elements/elements.dart' show AstElement, LocalElement;
import '../js/js.dart' as js;
import '../js/js_source_mapping.dart';
import '../tokens/token.dart' show Token;
@@ -51,21 +48,20 @@ class StartEndSourceInformation extends SourceInformation {
int get hashCode {
return 0x7FFFFFFF &
- (startPosition.hashCode * 17 + endPosition.hashCode * 19);
+ (startPosition.hashCode * 17 + endPosition.hashCode * 19);
}
bool operator ==(other) {
if (identical(this, other)) return true;
if (other is! StartEndSourceInformation) return false;
return startPosition == other.startPosition &&
- endPosition == other.endPosition;
+ endPosition == other.endPosition;
}
// TODO(johnniwinther): Inline this in
// [StartEndSourceInformationBuilder.buildDeclaration].
static StartEndSourceInformation _computeSourceInformation(
AstElement element) {
-
AstElement implementation = element.implementation;
SourceFile sourceFile = implementation.compilationUnit.script.file;
String name = computeElementNameForSourceMaps(element);
@@ -140,10 +136,8 @@ class StartEndSourceInformationProcessor extends SourceInformationProcessor {
StartEndSourceInformationProcessor(this.sourceMapper);
@override
- void onPositions(js.Node node,
- int startPosition,
- int endPosition,
- int closingPosition) {
+ void onPositions(
+ js.Node node, int startPosition, int endPosition, int closingPosition) {
if (node.sourceInformation != null) {
StartEndSourceInformation sourceInformation = node.sourceInformation;
sourceMapper.register(
@@ -183,10 +177,11 @@ class StartEndSourceInformationBuilder extends SourceInformationBuilder {
SourceLocation location, SourceFile sourceFile, int offset) {
if (!location.isValid) {
throw MessageTemplate.TEMPLATES[MessageKind.INVALID_SOURCE_FILE_LOCATION]
- .message(
- {'offset': offset,
- 'fileName': sourceFile.filename,
- 'length': sourceFile.length});
+ .message({
+ 'offset': offset,
+ 'fileName': sourceFile.filename,
+ 'length': sourceFile.length
+ });
}
}
@@ -224,11 +219,8 @@ class StartEndSourceInformationBuilder extends SourceInformationBuilder {
SourceInformation buildIf(Node node) => buildGeneric(node);
@override
- SourceInformationBuilder forContext(
- AstElement element, {SourceInformation sourceInformation}) {
+ SourceInformationBuilder forContext(AstElement element,
+ {SourceInformation sourceInformation}) {
return new StartEndSourceInformationBuilder(element);
}
}
-
-
-
« no previous file with comments | « pkg/compiler/lib/src/io/source_map_builder.dart ('k') | pkg/compiler/lib/src/js/js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698