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

Unified Diff: pkg/analyzer2dart/lib/src/util.dart

Issue 1214853002: Update some files from CRLF to LF (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/analyzer2dart/lib/src/semantic_visitor.dart ('k') | pkg/compiler/lib/src/elements/common.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer2dart/lib/src/util.dart
diff --git a/pkg/analyzer2dart/lib/src/util.dart b/pkg/analyzer2dart/lib/src/util.dart
index 67ee97e1152ee29a490ae4ebea4bbc691d97a70b..fd1c20b72ef6926d5e8aff13e5105a2dd5709aa2 100644
--- a/pkg/analyzer2dart/lib/src/util.dart
+++ b/pkg/analyzer2dart/lib/src/util.dart
@@ -1,42 +1,42 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Utility function shared between different parts of analyzer2dart.
-
-library analyzer2dart.util;
-
-import 'package:analyzer/analyzer.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:compiler/src/elements/elements.dart' show PublicName;
-import 'package:compiler/src/universe/universe.dart';
-import 'package:compiler/src/io/source_file.dart';
-
-CallStructure createCallStructureFromMethodInvocation(ArgumentList node) {
- int arity = 0;
- List<String> namedArguments = <String>[];
- for (Expression argument in node.arguments) {
- if (argument is NamedExpression) {
- namedArguments.add(argument.name.label.name);
- } else {
- arity++;
- }
- }
- return new CallStructure(arity, namedArguments);
-}
-
-Selector createSelectorFromMethodInvocation(ArgumentList node,
- String name) {
- CallStructure callStructure = createCallStructureFromMethodInvocation(node);
- // TODO(johnniwinther): Support private names.
- return new Selector(SelectorKind.CALL, new PublicName(name), callStructure);
-}
-
-/// Prints [message] together with source code pointed to by [node] from
-/// [source].
-void reportSourceMessage(Source source, AstNode node, String message) {
- SourceFile sourceFile =
- new StringSourceFile.fromName(source.fullName, source.contents.data);
-
- print(sourceFile.getLocationMessage(message, node.offset, node.end));
-}
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Utility function shared between different parts of analyzer2dart.
+
+library analyzer2dart.util;
+
+import 'package:analyzer/analyzer.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:compiler/src/elements/elements.dart' show PublicName;
+import 'package:compiler/src/universe/universe.dart';
+import 'package:compiler/src/io/source_file.dart';
+
+CallStructure createCallStructureFromMethodInvocation(ArgumentList node) {
+ int arity = 0;
+ List<String> namedArguments = <String>[];
+ for (Expression argument in node.arguments) {
+ if (argument is NamedExpression) {
+ namedArguments.add(argument.name.label.name);
+ } else {
+ arity++;
+ }
+ }
+ return new CallStructure(arity, namedArguments);
+}
+
+Selector createSelectorFromMethodInvocation(ArgumentList node,
+ String name) {
+ CallStructure callStructure = createCallStructureFromMethodInvocation(node);
+ // TODO(johnniwinther): Support private names.
+ return new Selector(SelectorKind.CALL, new PublicName(name), callStructure);
+}
+
+/// Prints [message] together with source code pointed to by [node] from
+/// [source].
+void reportSourceMessage(Source source, AstNode node, String message) {
+ SourceFile sourceFile =
+ new StringSourceFile.fromName(source.fullName, source.contents.data);
+
+ print(sourceFile.getLocationMessage(message, node.offset, node.end));
+}
« no previous file with comments | « pkg/analyzer2dart/lib/src/semantic_visitor.dart ('k') | pkg/compiler/lib/src/elements/common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698