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

Unified Diff: dart/compiler/java/com/google/dart/compiler/ast/DartMethodInvocation.java

Issue 20722006: Removed compiler/ directory from repository (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/compiler/java/com/google/dart/compiler/ast/DartMethodInvocation.java
diff --git a/dart/compiler/java/com/google/dart/compiler/ast/DartMethodInvocation.java b/dart/compiler/java/com/google/dart/compiler/ast/DartMethodInvocation.java
deleted file mode 100644
index 4f3b0cdc99de89d19ca521b88950cf8b027bd7f0..0000000000000000000000000000000000000000
--- a/dart/compiler/java/com/google/dart/compiler/ast/DartMethodInvocation.java
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) 2012, 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.
-
-package com.google.dart.compiler.ast;
-
-import java.util.List;
-
-/**
- * Method invocation AST node. The name of the method must not be null. The receiver is an
- * expression, super, or a classname.
- * <p>
- * {@link DartMethodInvocation} may be created at the parsing time not only for invocation of actual
- * method, but also for invocation of function object in some object. For example:
- *
- * <pre>
- * class A {
- * Function run;
- * }
- * test(A a) {
- * a.run();
- * }
- * </pre>
- */
-public class DartMethodInvocation extends DartInvocation {
-
- private DartExpression target;
- private boolean isCascade;
- private DartIdentifier functionName;
-
- public DartMethodInvocation(DartExpression target,
- boolean isCascade,
- DartIdentifier functionName,
- List<DartExpression> args) {
- super(args);
- functionName.getClass(); // Quick null-check.
- this.target = becomeParentOf(target);
- this.isCascade = isCascade;
- this.functionName = becomeParentOf(functionName);
- }
-
- @Override
- public DartExpression getTarget() {
- return target;
- }
-
- public DartExpression getRealTarget() {
- if (isCascade) {
- DartNode ancestor = getParent();
- while (!(ancestor instanceof DartCascadeExpression)) {
- if (ancestor == null) {
- return target;
- }
- ancestor = ancestor.getParent();
- }
- return ((DartCascadeExpression) ancestor).getTarget();
- }
- return target;
- }
-
- public String getFunctionNameString() {
- return functionName.getName();
- }
-
- public boolean isCascade() {
- return isCascade;
- }
-
- public DartIdentifier getFunctionName() {
- return functionName;
- }
-
- public void setFunctionName(DartIdentifier newName) {
- newName.getClass(); // Quick null-check.
- functionName = becomeParentOf(newName);
- }
-
- @Override
- public void visitChildren(ASTVisitor<?> visitor) {
- safelyVisitChild(target, visitor);
- safelyVisitChild(functionName, visitor);
- visitor.visit(getArguments());
- }
-
- @Override
- public <R> R accept(ASTVisitor<R> visitor) {
- return visitor.visitMethodInvocation(this);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698