Permalink
Browse files

Renamed generator.

  • Loading branch information...
1 parent 3f88fa4 commit e42db4bf3121cd07e0be487a7ebf985309cc0f74 Evgeny Gerashchenko committed Mar 19, 2013
@@ -1,4 +1,4 @@
-// Generated by org.jetbrains.jet.generators.runtime.GenerateTuplesAndFunctions
+// Generated by org.jetbrains.jet.generators.runtime.GenerateFunctions
package jet
@@ -1,4 +1,4 @@
-// Generated by org.jetbrains.jet.generators.runtime.GenerateTuplesAndFunctions
+// Generated by org.jetbrains.jet.generators.runtime.GenerateFunctions
package jet
@@ -20,12 +20,12 @@
import java.io.FileNotFoundException;
import java.io.PrintStream;
-public class GenerateTuplesAndFunctions {
- private static final int TUPLE_COUNT = 23;
+public class GenerateFunctions {
+ private static final int MAX_PARAM_COUNT = 22;
private static void generateFunctions(PrintStream out, int count, boolean extension) {
generated(out);
- for (int i = 0; i < count; i++) {
+ for (int i = 0; i <= count; i++) {
out.print("public abstract class " + (extension ? "ExtensionFunction" : "Function") + i);
out.print("<");
if (extension) {
@@ -53,7 +53,7 @@ private static void generateFunctions(PrintStream out, int count, boolean extens
}
private static void generated(PrintStream out) {
- out.println("// Generated by " + GenerateTuplesAndFunctions.class.getName());
+ out.println("// Generated by " + GenerateFunctions.class.getName());
out.println();
out.println("package jet");
out.println();
@@ -64,14 +64,14 @@ public static void main(String[] args) throws FileNotFoundException {
assert baseDir.exists() : "Base dir does not exist: " + baseDir.getAbsolutePath();
PrintStream functions = new PrintStream(new File(baseDir, "Functions.jet"));
- generateFunctions(functions, TUPLE_COUNT, false);
+ generateFunctions(functions, MAX_PARAM_COUNT, false);
functions.close();
PrintStream extensionFunctions = new PrintStream(new File(baseDir, "ExtensionFunctions.jet"));
- generateFunctions(extensionFunctions, TUPLE_COUNT, true);
+ generateFunctions(extensionFunctions, MAX_PARAM_COUNT, true);
extensionFunctions.close();
}
- private GenerateTuplesAndFunctions() {
+ private GenerateFunctions() {
}
}

0 comments on commit e42db4b

Please sign in to comment.