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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/js/nodes.dart

Issue 19391004: Implement reflective access to static methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 7 years, 5 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: dart/sdk/lib/_internal/compiler/implementation/js/nodes.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/js/nodes.dart b/dart/sdk/lib/_internal/compiler/implementation/js/nodes.dart
index 1f1134c3ae85f10c5d099e9ad531ffe2f63078a5..04eafb95ccd30613f3eb1e24c9ed37b29f9df84f 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/js/nodes.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/js/nodes.dart
@@ -28,6 +28,7 @@ abstract class NodeVisitor<T> {
T visitLabeledStatement(LabeledStatement node);
T visitLiteralStatement(LiteralStatement node);
+ T visitBlob(Blob node);
T visitLiteralExpression(LiteralExpression node);
T visitVariableDeclarationList(VariableDeclarationList node);
T visitSequence(Sequence node);
@@ -103,6 +104,7 @@ class BaseVisitor<T> implements NodeVisitor<T> {
T visitDefault(Default node) => visitNode(node);
T visitExpression(Expression node) => visitNode(node);
+ T visitBlob(Blob node) => visitExpression(node);
T visitVariableReference(VariableReference node) => visitExpression(node);
T visitLiteralExpression(LiteralExpression node) => visitExpression(node);
@@ -516,6 +518,22 @@ abstract class Expression extends Node {
Prefix get not => new Prefix('!', this);
}
+/// Wrap a CodeBuffer as an expression.
+class Blob extends Expression {
+ // TODO(ahe): This class is an aid to convert everything to ASTs, remove when
+ // not needed anymore.
+
+ final leg.CodeBuffer buffer;
+
+ Blob(this.buffer);
+
+ accept(NodeVisitor visitor) => visitor.visitBlob(this);
+
+ void visitChildren(NodeVisitor visitor) {}
+
+ int get precedenceLevel => PRIMARY;
+}
+
class LiteralExpression extends Expression {
final String template;
final List<Expression> inputs;

Powered by Google App Engine
This is Rietveld 408576698