aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/ldc.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compilers/ldc.js')
-rw-r--r--lib/compilers/ldc.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/compilers/ldc.js b/lib/compilers/ldc.js
index 65dcd587a..eab2d235a 100644
--- a/lib/compilers/ldc.js
+++ b/lib/compilers/ldc.js
@@ -23,7 +23,7 @@
// POSSIBILITY OF SUCH DAMAGE.
const BaseCompiler = require('../base-compiler'),
- argumentParsers = require("./argument-parsers"),
+ argumentParsers = require('./argument-parsers'),
fs = require('fs-extra'),
logger = require('./../logger').logger,
path = require('path'),
@@ -63,12 +63,12 @@ class LDCCompiler extends BaseCompiler {
couldSupportASTDump(version) {
const versionRegex = /\((\d\.\d+)\.\d+/;
const versionMatch = versionRegex.exec(version);
- return versionMatch ? semverParser.compare(versionMatch[1] + ".0", "1.4.0") >= 0 : false;
+ return versionMatch ? semverParser.compare(versionMatch[1] + '.0', '1.4.0') >= 0 : false;
}
async generateAST(inputFilename, options) {
// These options make LDC produce an AST dump in a separate file `<inputFilename>.cg`.
- const newOptions = options.concat("-vcg-ast");
+ const newOptions = options.concat('-vcg-ast');
const execOptions = this.getDefaultExecOptions();
return this.loadASTOutput(
await this.runCompiler(this.compiler.exe, newOptions, this.filename(inputFilename), execOptions));
@@ -80,13 +80,13 @@ class LDCCompiler extends BaseCompiler {
}
// Load the AST output from the `.cg` file.
// Demangling is not needed.
- const astFilename = output.inputFilename.concat(".cg");
+ const astFilename = output.inputFilename.concat('.cg');
try {
return await fs.readFile(astFilename, 'utf-8');
} catch (e) {
if (e instanceof Error && e.code === 'ENOENT') {
logger.warn(`LDC AST file ${astFilename} requested but it does not exist`);
- return "";
+ return '';
}
throw e;
}