Package org.ek9lang.compiler
Class CompilerFlags
java.lang.Object
org.ek9lang.compiler.CompilerFlags
- Direct Known Subclasses:
Ek9CompilerConfig
Used to drive how the compiler operates.
As error message details, future will be to add debug output files for 'edb' the Ek9 Debugger.
We may even have things like target or flags to drive different type out output generation.
Maybe one day - but right now it's just how much help do you want on errors.
I'm expecting that when we run 'ek9' or whatever we call the compiler there will be flags
like '-Cg/-cg' for debug and the like.
These options below will also have flags like -Xhelp:key(,key)*
-Xhelp:+method,-type,+variable - would be a good way to enable methodSuggestionRequired,
disable typeFunctionConstructorSuggestionRequired and enable variableSuggestionRequired.
Also -Xlint:key(,key)* for different levels of warning - which we can drive from here
when we want to control warnings.
Some of these flags exist in CommandLineDetails, I may move some or all of that configuration
into this class. But those options are more about 'what' to do with the compiler.
These flags are more like - how you want the compiler to behave when issuing errors or
suggestions.
-
Constructor Summary
ConstructorDescriptionCompilerFlags
(boolean verbose) CompilerFlags
(CompilationPhase compileToPhase) CompilerFlags
(CompilationPhase compileToPhase, boolean verbose) -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
boolean
boolean
boolean
boolean
void
setCheckCompilationOnly
(boolean checkCompilationOnly) Only run a check compilation.void
setCompileToPhase
(CompilationPhase compileToPhase) Only compile to a specific phase of the overall compilation process.void
setDebuggingInstrumentation
(boolean debuggingInstrumentation) void
setDevBuild
(boolean devBuild) void
setNumberOfSuggestions
(int numberOfSuggestions) Configure the number of suggestions for interactive help on errors.void
setSuggestionRequired
(boolean suggestionRequired) void
setVerbose
(boolean verbose)
-
Constructor Details
-
CompilerFlags
public CompilerFlags() -
CompilerFlags
-
CompilerFlags
-
CompilerFlags
public CompilerFlags(boolean verbose)
-
-
Method Details
-
isSuggestionRequired
public boolean isSuggestionRequired() -
setSuggestionRequired
public void setSuggestionRequired(boolean suggestionRequired) -
getNumberOfSuggestions
public int getNumberOfSuggestions() -
setNumberOfSuggestions
public void setNumberOfSuggestions(int numberOfSuggestions) Configure the number of suggestions for interactive help on errors. -
getCompileToPhase
-
setCompileToPhase
Only compile to a specific phase of the overall compilation process. -
isDebuggingInstrumentation
public boolean isDebuggingInstrumentation() -
setDebuggingInstrumentation
public void setDebuggingInstrumentation(boolean debuggingInstrumentation) -
isDevBuild
public boolean isDevBuild() -
setDevBuild
public void setDevBuild(boolean devBuild) -
isCheckCompilationOnly
public boolean isCheckCompilationOnly() -
setCheckCompilationOnly
public void setCheckCompilationOnly(boolean checkCompilationOnly) Only run a check compilation. This means run upto IR Analysis phase only. -
isVerbose
public boolean isVerbose() -
setVerbose
public void setVerbose(boolean verbose)
-