Make K2JSTranslator#generateProgramCode public
Rename: convertToDotJsFile ->convertFileNameToDoJsFile
This commit is contained in:
@@ -24,7 +24,7 @@ import java.io.File;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static org.jetbrains.k2js.test.utils.JsTestUtils.convertToDotJsFile;
|
import static org.jetbrains.k2js.test.utils.JsTestUtils.convertFileNameToDotJsFile;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Pavel Talanov
|
* @author Pavel Talanov
|
||||||
@@ -132,7 +132,7 @@ public abstract class BasicTest extends TestWithEnvironment {
|
|||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
protected String getOutputFilePath(@NotNull String filename) {
|
protected String getOutputFilePath(@NotNull String filename) {
|
||||||
return getOutputPath() + convertToDotJsFile(filename);
|
return getOutputPath() + convertFileNameToDotJsFile(filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public final class JsTestUtils {
|
|||||||
private JsTestUtils() {
|
private JsTestUtils() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String convertToDotJsFile(@NotNull String filename) {
|
public static String convertFileNameToDotJsFile(@NotNull String filename) {
|
||||||
return filename.substring(0, filename.lastIndexOf('.')) + ".js";
|
return filename.substring(0, filename.lastIndexOf('.')) + ".js";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ public final class K2JSTranslator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private String generateProgramCode(@NotNull List<JetFile> files) {
|
public String generateProgramCode(@NotNull List<JetFile> files) {
|
||||||
JsProgram program = generateProgram(files);
|
JsProgram program = generateProgram(files);
|
||||||
CodeGenerator generator = new CodeGenerator();
|
CodeGenerator generator = new CodeGenerator();
|
||||||
return generator.generateToString(program);
|
return generator.generateToString(program);
|
||||||
|
|||||||
Reference in New Issue
Block a user