Class: KipperCompileResult
compiler.KipperCompileResult
The result of a KipperCompiler compilation.
Since
0.0.3
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new KipperCompileResult(fileCtx?
, result?
, syntaxErrors?
)
Parameters
Name | Type |
---|---|
fileCtx? |
KipperProgramContext |
result? |
TranslatedCodeLine [] |
syntaxErrors? |
KipperSyntaxError [] |
Defined in
kipper/core/src/compiler/compile-result.ts:18
Properties
_programCtx
• Private
Readonly
_programCtx: undefined
| KipperProgramContext
Defined in
kipper/core/src/compiler/compile-result.ts:14
_result
• Private
Readonly
_result: undefined
| TranslatedCodeLine
[]
Defined in
kipper/core/src/compiler/compile-result.ts:15
_syntaxErrors
• Private
Readonly
_syntaxErrors: undefined
| KipperSyntaxError
[]
Defined in
kipper/core/src/compiler/compile-result.ts:16
Accessors
errors
• get
errors(): KipperError
[]
The list of errors that were raised during the compilation process.
Errors are either syntax or compilation errors, which are raised when the compiler encounters a situation that it prevents it from continuing processing.
Since
0.10.0
Returns
Defined in
kipper/core/src/compiler/compile-result.ts:70
programCtx
• get
programCtx(): undefined
| KipperProgramContext
The program context for the compilation run, which stores the content of the program and meta-data.
If undefined is returned that automatically indicates that the compilation failed due to a syntax error.
Returns
undefined
| KipperProgramContext
Defined in
kipper/core/src/compiler/compile-result.ts:33
result
• get
result(): undefined
| TranslatedCodeLine
[]
The result of the compilation in TypeScript form (every line is represented as an entry in the array).
Returns
undefined
| TranslatedCodeLine
[]
Defined in
kipper/core/src/compiler/compile-result.ts:40
success
• get
success(): boolean
Returns true, if the compilation was successful without errors.
Since
0.10.0
Returns
boolean
Defined in
kipper/core/src/compiler/compile-result.ts:48
warnings
• get
warnings(): KipperError
[]
The list of warnings that were raised during the compilation process.
Warnings are non-fatal errors, which are raised when the compiler encounters a situation that it considers to be problematic, but which do not prevent the program from being compiled.
Since
0.9.0
Returns
Defined in
kipper/core/src/compiler/compile-result.ts:59
Methods
write
▸ write(lineEnding?
): string
Creates a string from the compiled code that can be written to a file in a human-readable way.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
lineEnding |
string |
"\n" |
The line ending for each line of the file. Default line ending is LF ('\n'). |
Returns
string
Defined in
kipper/core/src/compiler/compile-result.ts:80