summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/cmd/gen/CodegenSpec.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-01-23 23:06:28 +0000
committerPaul Phillips <paulp@improving.org>2011-01-23 23:06:28 +0000
commit1cbe06c2dcde9606c3d3f6fe86e89fbba3a404e3 (patch)
treeb15c06f85c6733f74b516ceaaf90adea9edb3bbb /src/compiler/scala/tools/cmd/gen/CodegenSpec.scala
parentde9a8b91948235df1fbb6867d89ff842d95fbc50 (diff)
downloadscala-1cbe06c2dcde9606c3d3f6fe86e89fbba3a404e3.tar.gz
scala-1cbe06c2dcde9606c3d3f6fe86e89fbba3a404e3.tar.bz2
scala-1cbe06c2dcde9606c3d3f6fe86e89fbba3a404e3.zip
Tackled source generation from a new angle rath...
Tackled source generation from a new angle rather than letting genprod get any more creaky. This code generates the AnyVal source files (but those are not included here.) No review.
Diffstat (limited to 'src/compiler/scala/tools/cmd/gen/CodegenSpec.scala')
-rw-r--r--src/compiler/scala/tools/cmd/gen/CodegenSpec.scala30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/cmd/gen/CodegenSpec.scala b/src/compiler/scala/tools/cmd/gen/CodegenSpec.scala
new file mode 100644
index 0000000000..e655334b1b
--- /dev/null
+++ b/src/compiler/scala/tools/cmd/gen/CodegenSpec.scala
@@ -0,0 +1,30 @@
+/* NEST (New Scala Test)
+ * Copyright 2007-2011 LAMP/EPFL
+ * @author Paul Phillips
+ */
+
+package scala.tools.cmd
+package gen
+
+import FromString.ExistingDir
+
+trait CodegenSpec extends Spec with Meta.StdOpts with Interpolation {
+ def referenceSpec = CodegenSpec
+ def programInfo = Spec.Info("codegen", "", "scala.tools.cmd.cmd")
+
+ import FromString.ExistingDir
+
+ help("Usage: codegen [<options>]")
+
+ val inDir = "in" / "directory containing templates" --^ ExistingDir
+ val outDir = "out" / "directory for generated files" --^ ExistingDir
+ val install = "install" / "write source files directly to src/library/scala"
+ val anyvals = "anyvals" / "generate sources for AnyVal types" --?
+ val products = "products" / "generate sources for ProductN, FunctionN, etc." --?
+ val genall = "all" / "generate sources for everything" --?
+}
+
+object CodegenSpec extends CodegenSpec with Reference {
+ type ThisCommandLine = CommandLine
+ def creator(args: List[String]): ThisCommandLine = new CommandLine(CodegenSpec, args)
+}