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

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

Issue 1088933004: Use CallStructure instead of Selector in SemanticSendVisitor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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/analyzer2dart/lib/src/util.dart
diff --git a/pkg/analyzer2dart/lib/src/util.dart b/pkg/analyzer2dart/lib/src/util.dart
index e4b0d33b83246f1b044f74c3f083effc11c8a00e..67ee97e1152ee29a490ae4ebea4bbc691d97a70b 100644
--- a/pkg/analyzer2dart/lib/src/util.dart
+++ b/pkg/analyzer2dart/lib/src/util.dart
@@ -8,11 +8,11 @@ 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';
-Selector createSelectorFromMethodInvocation(ArgumentList node,
- String name) {
+CallStructure createCallStructureFromMethodInvocation(ArgumentList node) {
int arity = 0;
List<String> namedArguments = <String>[];
for (Expression argument in node.arguments) {
@@ -22,7 +22,14 @@ Selector createSelectorFromMethodInvocation(ArgumentList node,
arity++;
}
}
- return new Selector.call(name, null, arity, namedArguments);
+ 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

Powered by Google App Engine
This is Rietveld 408576698