com.google.dart.compiler.backend.js
Class JsConstructExpressionVisitor

java.lang.Object
  extended by JsVisitor
      extended by com.google.dart.compiler.backend.js.ast.RecursiveJsVisitor
          extended by com.google.dart.compiler.backend.js.JsConstructExpressionVisitor

public class JsConstructExpressionVisitor
extends RecursiveJsVisitor

Searches for method invocations in constructor expressions that would not normally be surrounded by parentheses.


Method Summary
<T extends JsNode>
void
accept(T node)
          We only look at nodes that would not normally be surrounded by parentheses.
static boolean exec(JsExpression expression)
           
 void visitArray(JsArrayLiteral x)
          Array literals have their own scoping.
 void visitArrayAccess(JsArrayAccess x)
          We only look at the array expression since the index has its own scope.
 void visitFunction(JsFunction x)
          Functions have their own scoping.
 void visitInvocation(JsInvocation invocation)
           
 void visitNameRef(JsNameRef nameRef)
           
 void visitNew(JsNew x)
          New constructs bind to the nearest set of parentheses.
 void visitObjectLiteral(JsObjectLiteral x)
          Object literals have their own scope.
 
Methods inherited from class com.google.dart.compiler.backend.js.ast.RecursiveJsVisitor
visitElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

exec

public static boolean exec(JsExpression expression)

visitArrayAccess

public void visitArrayAccess(@NotNull
                             JsArrayAccess x)
We only look at the array expression since the index has its own scope.


visitArray

public void visitArray(@NotNull
                       JsArrayLiteral x)
Array literals have their own scoping.


visitFunction

public void visitFunction(@NotNull
                          JsFunction x)
Functions have their own scoping.


visitInvocation

public void visitInvocation(@NotNull
                            JsInvocation invocation)

visitNameRef

public void visitNameRef(@NotNull
                         JsNameRef nameRef)

visitNew

public void visitNew(@NotNull
                     JsNew x)
New constructs bind to the nearest set of parentheses.


visitObjectLiteral

public void visitObjectLiteral(@NotNull
                               JsObjectLiteral x)
Object literals have their own scope.


accept

public <T extends JsNode> void accept(T node)
We only look at nodes that would not normally be surrounded by parentheses.