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

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

Issue 762213002: Support top-level field declaration and assignment in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years 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 | « no previous file | pkg/analyzer2dart/lib/src/cps_generator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer2dart/lib/src/converted_world.dart
diff --git a/pkg/analyzer2dart/lib/src/converted_world.dart b/pkg/analyzer2dart/lib/src/converted_world.dart
index ba6d8ce742813444b13524a3379a5463569e1f50..65a8c6316272cf293cf427a69da241952fcade7e 100644
--- a/pkg/analyzer2dart/lib/src/converted_world.dart
+++ b/pkg/analyzer2dart/lib/src/converted_world.dart
@@ -14,6 +14,7 @@ import 'package:compiler/src/cps_ir/cps_ir_nodes.dart' as ir;
import 'closed_world.dart';
import 'element_converter.dart';
import 'cps_generator.dart';
+import 'util.dart';
/// A [ClosedWorld] converted to the dart2js element model.
abstract class ConvertedWorld {
@@ -55,14 +56,15 @@ ConvertedWorld convertWorld(ClosedWorld closedWorld) {
dart2js.AstElement dart2jsElement =
converter.convertElement(analyzerElement);
- CpsGeneratingVisitor visitor =
- new CpsGeneratingVisitor(converter, analyzerElement);
- ir.Node cpsNode = node.accept(visitor);
+ CpsElementVisitor visitor = new CpsElementVisitor(converter, node);
+ ir.Node cpsNode = analyzerElement.accept(visitor);
if (cpsNode != null) {
convertedWorld.executableElements[dart2jsElement] = cpsNode;
} else {
- visitor.giveUp(node,
- 'No CPS node generated for $analyzerElement (${node.runtimeType}).');
+ String message =
+ 'No CPS node generated for $analyzerElement (${node.runtimeType}).';
+ reportSourceMessage(analyzerElement.source, node, message);
+ throw new UnimplementedError(message);
}
}
@@ -72,4 +74,3 @@ ConvertedWorld convertWorld(ClosedWorld closedWorld) {
return convertedWorld;
}
-
« no previous file with comments | « no previous file | pkg/analyzer2dart/lib/src/cps_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698