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

Unified Diff: pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart

Issue 759193005: Add support for fields to the new dart backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 6 years, 1 month 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/dart_backend/backend_ast_nodes.dart
diff --git a/pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart b/pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart
index 9048405f357a9a5e2644ad3e0d5dc3fa1b62d43d..2d113ed8476132cfa073a156d2fc31f58702b416 100644
--- a/pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart
+++ b/pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart
@@ -26,6 +26,16 @@ abstract class Expression extends Node implements Receiver, Argument {
bool get assignable => false;
}
+abstract class ExecutableDefinition extends Node {
+ elements.Element get element;
+}
+
+class FieldDefinition extends ExecutableDefinition {
+ final elements.Element element;
+ final Expression initializer;
+ FieldDefinition(this.element, this.initializer);
+}
+
abstract class Statement extends Node {}
/// Used as receiver in expressions that dispatch to the super class.
@@ -296,7 +306,7 @@ class Parameter extends Node {
// EXPRESSIONS
-class FunctionExpression extends Expression {
+class FunctionExpression extends Expression implements ExecutableDefinition {
final TypeAnnotation returnType;
String name;
final Parameters parameters;

Powered by Google App Engine
This is Rietveld 408576698