org.jetbrains.k2js.translate.general
Class Translation

java.lang.Object
  extended by org.jetbrains.k2js.translate.general.Translation

public final class Translation
extends java.lang.Object

This class provides a interface which all translators use to interact with each other. Goal is to simplify interaction between translators.


Method Summary
static com.google.dart.compiler.backend.js.ast.JsNode doTranslateExpression(JetExpression expression, TranslationContext context)
           
static FunctionTranslator functionTranslator(JetDeclarationWithBody function, TranslationContext context)
           
static com.google.dart.compiler.backend.js.ast.JsProgram generateAst(BindingContext bindingContext, java.util.Collection<JetFile> files, MainCallParameters mainCallParameters, Config config)
           
static PatternTranslator patternTranslator(TranslationContext context)
           
static com.google.dart.compiler.backend.js.ast.JsExpression translateAsExpression(JetExpression expression, TranslationContext context)
           
static com.google.dart.compiler.backend.js.ast.JsStatement translateAsStatement(JetExpression expression, TranslationContext context)
           
static com.google.dart.compiler.backend.js.ast.JsNode translateExpression(JetExpression expression, TranslationContext context)
           
static com.google.dart.compiler.backend.js.ast.JsNode translateWhenExpression(JetWhenExpression expression, TranslationContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

functionTranslator

@NotNull
public static FunctionTranslator functionTranslator(@NotNull
                                                            JetDeclarationWithBody function,
                                                            @NotNull
                                                            TranslationContext context)

patternTranslator

@NotNull
public static PatternTranslator patternTranslator(@NotNull
                                                          TranslationContext context)

translateExpression

@NotNull
public static com.google.dart.compiler.backend.js.ast.JsNode translateExpression(@NotNull
                                                                                         JetExpression expression,
                                                                                         @NotNull
                                                                                         TranslationContext context)

doTranslateExpression

@NotNull
public static com.google.dart.compiler.backend.js.ast.JsNode doTranslateExpression(JetExpression expression,
                                                                                           TranslationContext context)

translateAsExpression

@NotNull
public static com.google.dart.compiler.backend.js.ast.JsExpression translateAsExpression(@NotNull
                                                                                                 JetExpression expression,
                                                                                                 @NotNull
                                                                                                 TranslationContext context)

translateAsStatement

@NotNull
public static com.google.dart.compiler.backend.js.ast.JsStatement translateAsStatement(@NotNull
                                                                                               JetExpression expression,
                                                                                               @NotNull
                                                                                               TranslationContext context)

translateWhenExpression

@Nullable
public static com.google.dart.compiler.backend.js.ast.JsNode translateWhenExpression(@NotNull
                                                                                              JetWhenExpression expression,
                                                                                              @NotNull
                                                                                              TranslationContext context)

generateAst

@NotNull
public static com.google.dart.compiler.backend.js.ast.JsProgram generateAst(@NotNull
                                                                                    BindingContext bindingContext,
                                                                                    @NotNull
                                                                                    java.util.Collection<JetFile> files,
                                                                                    @NotNull
                                                                                    MainCallParameters mainCallParameters,
                                                                                    @NotNull
                                                                                    Config config)
                                                                     throws TranslationException
Throws:
TranslationException