JS: converted JsVisitor to Kotlin

This commit is contained in:
Alexey Tsvetkov
2015-03-26 13:43:00 +03:00
parent cd92e2de73
commit 1f705eb77a
@@ -2,209 +2,163 @@
// 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.backend.js.ast;
package com.google.dart.compiler.backend.js.ast
import com.google.dart.compiler.backend.js.ast.JsVars.JsVar;
import java.util.List;
import com.google.dart.compiler.backend.js.ast.JsVars.JsVar
public abstract class JsVisitor {
public <T extends JsNode> void accept(T node) {
node.accept(this);
public open fun <T : JsNode> accept(node: T) {
node.accept(this)
}
public final <T extends JsNode> void acceptList(List<T> collection) {
for (T node : collection) {
accept(node);
public fun <T : JsNode> acceptList(collection: List<T>) {
for (node in collection) {
accept(node)
}
}
public void acceptLvalue(JsExpression expression) {
accept(expression);
public fun acceptLvalue(expression: JsExpression) {
accept(expression)
}
public final <T extends JsNode> void acceptWithInsertRemove(List<T> collection) {
for (T node : collection) {
accept(node);
public fun <T : JsNode> acceptWithInsertRemove(collection: List<T>) {
for (node in collection) {
accept(node)
}
}
public void visitArrayAccess(JsArrayAccess x) {
visitElement(x);
}
public open fun visitArrayAccess(x: JsArrayAccess): Unit =
visitElement(x)
public void visitArray(JsArrayLiteral x) {
visitElement(x);
}
public open fun visitArray(x: JsArrayLiteral): Unit =
visitElement(x)
public void visitBinaryExpression(JsBinaryOperation x) {
visitElement(x);
}
public open fun visitBinaryExpression(x: JsBinaryOperation): Unit =
visitElement(x)
public void visitBlock(JsBlock x) {
visitElement(x);
}
public open fun visitBlock(x: JsBlock): Unit =
visitElement(x)
public void visitBoolean(JsLiteral.JsBooleanLiteral x) {
visitElement(x);
}
public open fun visitBoolean(x: JsLiteral.JsBooleanLiteral): Unit =
visitElement(x)
public void visitBreak(JsBreak x) {
visitElement(x);
}
public open fun visitBreak(x: JsBreak): Unit =
visitElement(x)
public void visitCase(JsCase x) {
visitElement(x);
}
public open fun visitCase(x: JsCase): Unit =
visitElement(x)
public void visitCatch(JsCatch x) {
visitElement(x);
}
public open fun visitCatch(x: JsCatch): Unit =
visitElement(x)
public void visitConditional(JsConditional x) {
visitElement(x);
}
public open fun visitConditional(x: JsConditional): Unit =
visitElement(x)
public void visitContinue(JsContinue x) {
visitElement(x);
}
public open fun visitContinue(x: JsContinue): Unit =
visitElement(x)
public void visitDebugger(JsDebugger x) {
visitElement(x);
}
public open fun visitDebugger(x: JsDebugger): Unit =
visitElement(x)
public void visitDefault(JsDefault x) {
visitElement(x);
}
public open fun visitDefault(x: JsDefault): Unit =
visitElement(x)
public void visitDoWhile(JsDoWhile x) {
visitElement(x);
}
public open fun visitDoWhile(x: JsDoWhile): Unit =
visitElement(x)
public void visitEmpty(JsEmpty x) {
visitElement(x);
}
public open fun visitEmpty(x: JsEmpty): Unit =
visitElement(x)
public void visitExpressionStatement(JsExpressionStatement x) {
visitElement(x);
}
public open fun visitExpressionStatement(x: JsExpressionStatement): Unit =
visitElement(x)
public void visitFor(JsFor x) {
visitElement(x);
}
public open fun visitFor(x: JsFor): Unit =
visitElement(x)
public void visitForIn(JsForIn x) {
visitElement(x);
}
public open fun visitForIn(x: JsForIn): Unit =
visitElement(x)
public void visitFunction(JsFunction x) {
visitElement(x);
}
public open fun visitFunction(x: JsFunction): Unit =
visitElement(x)
public void visitIf(JsIf x) {
visitElement(x);
}
public open fun visitIf(x: JsIf): Unit =
visitElement(x)
public void visitInvocation(JsInvocation invocation) {
visitElement(invocation);
}
public open fun visitInvocation(invocation: JsInvocation): Unit =
visitElement(invocation)
public void visitLabel(JsLabel x) {
visitElement(x);
}
public open fun visitLabel(x: JsLabel): Unit =
visitElement(x)
public void visitNameRef(JsNameRef nameRef) {
visitElement(nameRef);
}
public open fun visitNameRef(nameRef: JsNameRef): Unit =
visitElement(nameRef)
public void visitNew(JsNew x) {
visitElement(x);
}
public open fun visitNew(x: JsNew): Unit =
visitElement(x)
public void visitNull(JsNullLiteral x) {
visitElement(x);
}
public open fun visitNull(x: JsNullLiteral): Unit =
visitElement(x)
public void visitInt(JsNumberLiteral.JsIntLiteral x) {
visitElement(x);
}
public open fun visitInt(x: JsNumberLiteral.JsIntLiteral): Unit =
visitElement(x)
public void visitDouble(JsNumberLiteral.JsDoubleLiteral x) {
visitElement(x);
}
public open fun visitDouble(x: JsNumberLiteral.JsDoubleLiteral): Unit =
visitElement(x)
public void visitObjectLiteral(JsObjectLiteral x) {
visitElement(x);
}
public open fun visitObjectLiteral(x: JsObjectLiteral): Unit =
visitElement(x)
public void visitParameter(JsParameter x) {
visitElement(x);
}
public open fun visitParameter(x: JsParameter): Unit =
visitElement(x)
public void visitPostfixOperation(JsPostfixOperation x) {
visitElement(x);
}
public open fun visitPostfixOperation(x: JsPostfixOperation): Unit =
visitElement(x)
public void visitPrefixOperation(JsPrefixOperation x) {
visitElement(x);
}
public open fun visitPrefixOperation(x: JsPrefixOperation): Unit =
visitElement(x)
public void visitProgram(JsProgram x) {
visitElement(x);
}
public open fun visitProgram(x: JsProgram): Unit =
visitElement(x)
public void visitProgramFragment(JsProgramFragment x) {
visitElement(x);
}
public open fun visitProgramFragment(x: JsProgramFragment): Unit =
visitElement(x)
public void visitPropertyInitializer(JsPropertyInitializer x) {
visitElement(x);
}
public open fun visitPropertyInitializer(x: JsPropertyInitializer): Unit =
visitElement(x)
public void visitRegExp(JsRegExp x) {
visitElement(x);
}
public open fun visitRegExp(x: JsRegExp): Unit =
visitElement(x)
public void visitReturn(JsReturn x) {
visitElement(x);
}
public open fun visitReturn(x: JsReturn): Unit =
visitElement(x)
public void visitString(JsStringLiteral x) {
visitElement(x);
}
public open fun visitString(x: JsStringLiteral): Unit =
visitElement(x)
public void visit(JsSwitch x) {
visitElement(x);
}
public open fun visit(x: JsSwitch): Unit =
visitElement(x)
public void visitThis(JsLiteral.JsThisRef x) {
visitElement(x);
}
public open fun visitThis(x: JsLiteral.JsThisRef): Unit =
visitElement(x)
public void visitThrow(JsThrow x) {
visitElement(x);
}
public open fun visitThrow(x: JsThrow): Unit =
visitElement(x)
public void visitTry(JsTry x) {
visitElement(x);
}
public open fun visitTry(x: JsTry): Unit =
visitElement(x)
public void visit(JsVar x) {
visitElement(x);
}
public open fun visit(x: JsVar): Unit =
visitElement(x)
public void visitVars(JsVars x) {
visitElement(x);
}
public open fun visitVars(x: JsVars): Unit =
visitElement(x)
public void visitWhile(JsWhile x) {
visitElement(x);
}
public open fun visitWhile(x: JsWhile): Unit =
visitElement(x)
public void visitDocComment(JsDocComment comment) {
visitElement(comment);
}
public open fun visitDocComment(comment: JsDocComment): Unit =
visitElement(comment)
protected void visitElement(JsNode node) {
protected open fun visitElement(node: JsNode) {
}
}