()
| 84 | } |
| 85 | |
| 86 | run() { |
| 87 | const source = this.readFileString(this.sourcePath); |
| 88 | const result = compileDataView(source, this.pragmas); |
| 89 | |
| 90 | if (result.errors) { |
| 91 | this.report(result.errors); |
| 92 | throw new Error("cdv failed for " + this.sourcePath); |
| 93 | } |
| 94 | |
| 95 | const parts = this.splitPath(this.sourcePath); |
| 96 | parts.extension = "." + result.language; |
| 97 | if (this.outputDirectory) |
| 98 | parts.directory = this.outputDirectory; |
| 99 | if (this.outputName) |
| 100 | parts.name = this.outputName; |
| 101 | const outputPath = this.joinPath(parts); |
| 102 | |
| 103 | const output = new FILE(outputPath, "wb"); |
| 104 | output.writeString(result.script); |
| 105 | output.close(); |
| 106 | } |
| 107 | } |
nothing calls this directly
no test coverage detected