summaryrefslogtreecommitdiff
path: root/sources/scalac/CompilerCommand.java
diff options
context:
space:
mode:
authormihaylov <mihaylov@epfl.ch>2004-05-03 14:40:31 +0000
committermihaylov <mihaylov@epfl.ch>2004-05-03 14:40:31 +0000
commite69136655090796dbd1eecda37215b515b7b5fe9 (patch)
tree8e08fad17007f463e1d46af832765b8e171b5b9f /sources/scalac/CompilerCommand.java
parent65d12219ef4dd0b5b509e7b0f259d292456baba5 (diff)
downloadscala-e69136655090796dbd1eecda37215b515b7b5fe9.tar.gz
scala-e69136655090796dbd1eecda37215b515b7b5fe9.tar.bz2
scala-e69136655090796dbd1eecda37215b515b7b5fe9.zip
- Added '-g' option to generate debugging info
- Added '-o' option to specify the name of the assembly generated by the MSIL backend - Corrected some typos - Rearranged the order in which the options are printed by '-help' to resebmle the output from 'javac -help'. In effect, the most frequently used options are shown first.
Diffstat (limited to 'sources/scalac/CompilerCommand.java')
-rw-r--r--sources/scalac/CompilerCommand.java65
1 files changed, 37 insertions, 28 deletions
diff --git a/sources/scalac/CompilerCommand.java b/sources/scalac/CompilerCommand.java
index f1d4fa8605..cd6c8a465e 100644
--- a/sources/scalac/CompilerCommand.java
+++ b/sources/scalac/CompilerCommand.java
@@ -42,6 +42,7 @@ public class CompilerCommand extends CommandParser {
public final CompilerPhases phases;
+ public final BooleanOptionParser debuginfo;
public final BooleanOptionParser nowarn;
public final BooleanOptionParser verbose;
public final BooleanOptionParser debug;
@@ -58,6 +59,7 @@ public class CompilerCommand extends CommandParser {
public final StringOptionParser outpath;
public final StringOptionParser encoding;
public final StringOptionParser assemrefs;
+ public final StringOptionParser assemname;
public final ChoiceOptionParser target;
public final BooleanOptionParser noimports;
public final BooleanOptionParser nopredefs;
@@ -107,6 +109,9 @@ public class CompilerCommand extends CommandParser {
ArgumentParser[] parsers = new ArgumentParser[] {
+ this.debuginfo = new BooleanOptionParser(this,
+ "g", "Generate debugging info", false),
+
this.nowarn = new BooleanOptionParser(this,
"nowarn", "Generate no warnings",
false),
@@ -115,30 +120,6 @@ public class CompilerCommand extends CommandParser {
"verbose", "Output messages about what the compiler is doing",
false),
- this.debug = new BooleanOptionParser(this,
- "debug", "Output debugging messages",
- false),
-
- this.explaintypes = new BooleanOptionParser(this,
- "explaintypes", "Explain type errors in more detail",
- false),
-
- this.uniqid = new BooleanOptionParser(this,
- "uniqid", "Print identifiers with unique names (debugging option)",
- false),
-
- this.types = new BooleanOptionParser(this,
- "types", "Print tree types (debugging option)",
- false),
-
- this.prompt = new BooleanOptionParser(this,
- "prompt", "Display a prompt after each error (debugging option)",
- false),
-
- this.separate = new ChoiceOptionParser(this,
- "separate", "read symbol files for separate compilation: (yes, no)",
- "separate", new String[]{"yes", "no"}, "default"),
-
//this.optimize = new OptimizeOptionParser(this,
// "optimize", "optimize bytecode (-optimize:help for option list)",
// null /* todo: uncomment: phases.OPTIMIZE */),
@@ -168,14 +149,42 @@ public class CompilerCommand extends CommandParser {
// !!! is there a way to get the platform default charset name
"encoding", "ISO-8859-1"),
- this.assemrefs = new StringOptionParser(this,
- "r", "Assemblies referenced by the source program",
- "assembly files", "."),
+ this.separate = new ChoiceOptionParser(this,
+ "separate", "Read symbol files for separate compilation: (yes, no)",
+ "separate", new String[]{"yes", "no"}, "default"),
this.target = new ChoiceOptionParser(this,
- "target", "Specify which bakend to use (jvm, msil)",
+ "target", "Specify which backend to use (jvm, msil)",
"target", Global.TARGETS, Global.TARGET_JVM),
+ this.assemrefs = new StringOptionParser(this, "r",
+ "Assemblies referenced by the source program (only relevant with '-target:msil')",
+ "assembly files", "."),
+
+ this.assemname = new StringOptionParser(this, "o",
+ "Name of the output assembly (only relevant with '-target:msil')",
+ "assembly name", null),
+
+ this.debug = new BooleanOptionParser(this,
+ "debug", "Output debugging messages",
+ false),
+
+ this.explaintypes = new BooleanOptionParser(this,
+ "explaintypes", "Explain type errors in more detail",
+ false),
+
+ this.uniqid = new BooleanOptionParser(this,
+ "uniqid", "Print identifiers with unique names (debugging option)",
+ false),
+
+ this.types = new BooleanOptionParser(this,
+ "types", "Print tree types (debugging option)",
+ false),
+
+ this.prompt = new BooleanOptionParser(this,
+ "prompt", "Display a prompt after each error (debugging option)",
+ false),
+
this.noimports = new BooleanOptionParser(this,
"noimports", "Compile without any implicit imports",
false),