Class: EvaluatedCompileConfig
compiler.EvaluatedCompileConfig
Runtime Compile config class, which implements the CompileConfig interface and is able to be passed onto the compile function as a valid config argument.
This class will store both the default values and actual values for the compilation. All actual values will be processed and evaluated on construction, so that every option is not undefined.
Since
0.1.0
Implements
Table of contents
Constructors
Properties
- abortOnFirstError
- extendBuiltInFunctions
- extendBuiltInVariables
- fileName
- optimisationOptions
- recover
- target
- userOptions
- warnings
- defaults
Methods
Constructors
constructor
• new EvaluatedCompileConfig(rawConfig
)
Parameters
Name | Type |
---|---|
rawConfig |
CompileConfig |
Defined in
kipper/core/src/compiler/compile-config.ts:204
Properties
abortOnFirstError
• Readonly
abortOnFirstError: boolean
Throws an error and cancels the compilation on the first error that is encountered.
This per default overwrites recover.
Since
0.10.0
Implementation of
CompileConfig.abortOnFirstError
Defined in
kipper/core/src/compiler/compile-config.ts:187
extendBuiltInFunctions
• Readonly
extendBuiltInFunctions: BuiltInFunction
[]
Extensions to the global built-in functions that should not replace the primary builtInFunctions.
All built-in functions defined here must be implemented by the target.builtInGenerator.
Implementation of
CompileConfig.extendBuiltInFunctions
Defined in
kipper/core/src/compiler/compile-config.ts:140
extendBuiltInVariables
• Readonly
extendBuiltInVariables: BuiltInVariable
[]
Extends the builtInVariables with the specified items. If builtInVariables is undefined, then it will simply extend the default array.
All built-in variables defined here must be implemented by the target.builtInGenerator.
Since
0.10.0
Implementation of
CompileConfig.extendBuiltInVariables
Defined in
kipper/core/src/compiler/compile-config.ts:149
fileName
• Readonly
fileName: string
The filename that should be used to represent the program.
Since
0.2.0
Implementation of
Defined in
kipper/core/src/compiler/compile-config.ts:155
optimisationOptions
• Readonly
optimisationOptions: OptimisationOptions
Options for the KipperOptimiser.
Since
0.8.0
Implementation of
CompileConfig.optimisationOptions
Defined in
kipper/core/src/compiler/compile-config.ts:161
recover
• Readonly
recover: boolean
If set to true, the compiler will attempt to recover from compilation errors if they are encountered. This will lead to more errors being reported and allowing for bigger more detailed compiler logs, but can in rare cases lead to misleading errors that are caused as a result of another compilation errors.
Generally though, it is considered a good practise to use compiler error recovery, which is why it is enabled per default.
Since
0.10.0
Implementation of
Defined in
kipper/core/src/compiler/compile-config.ts:179
target
• Readonly
target: KipperCompileTarget
The translation languages for the compilation.
Since
0.5.0
Implementation of
Defined in
kipper/core/src/compiler/compile-config.ts:133
userOptions
• Readonly
userOptions: CompileConfig
Original user-defined CompileConfig, which may not be overwritten anymore, as the compile-arguments were already processed using the constructor of this class.
Defined in
kipper/core/src/compiler/compile-config.ts:113
warnings
• Readonly
warnings: boolean
If set to true, the compiler will check for warnings and add them to warnings and warnings.
Since
0.9.0
Implementation of
Defined in
kipper/core/src/compiler/compile-config.ts:168
defaults
▪ Static
Readonly
defaults: Object
The default configuration for this class.
Since
0.2.0
Type declaration
Name | Type |
---|---|
abortOnFirstError |
false |
extendBuiltInFunctions |
BuiltInFunction [] |
extendBuiltInVariables |
BuiltInVariable [] |
fileName |
string |
optimisationOptions |
OptimisationOptions |
recover |
true |
warnings |
true |
Defined in
kipper/core/src/compiler/compile-config.ts:119
Methods
getConfigOption
▸ Private
getConfigOption<T
>(option
, rawConfig
): T
Gets a non-undefined config option from the specified config object. If the option is undefined, then the default value will be returned.
Since
0.10.0
Type parameters
Name |
---|
T |
Parameters
Name | Type | Description |
---|---|---|
option |
"warnings" | "extendBuiltInFunctions" | "extendBuiltInVariables" | "fileName" | "optimisationOptions" | "recover" | "abortOnFirstError" |
The option key to get the option for. |
rawConfig |
CompileConfig |
The raw config object to get the option from. |
Returns
T
Defined in
kipper/core/src/compiler/compile-config.ts:197