diff options
author | bastien penavayre <bastien.penavayre.ext@mappy.com> | 2019-12-26 11:30:28 +0100 |
---|---|---|
committer | bastien penavayre <bastien.penavayre.ext@mappy.com> | 2019-12-26 11:43:49 +0100 |
commit | 60271909331cabea9461a1ca29ebe03b1201f75e (patch) | |
tree | e64175f95016e66cc7c45ebf2e31c69c06cf46f5 /lib/compilers/nim.js | |
parent | 34922876388b5c4155c100e1b79acc112c4eaf76 (diff) | |
download | compiler-explorer-60271909331cabea9461a1ca29ebe03b1201f75e.tar.gz compiler-explorer-60271909331cabea9461a1ca29ebe03b1201f75e.zip |
Move Nim code from runCompiler to filterUserOptions and remove custom runCompiler
Diffstat (limited to 'lib/compilers/nim.js')
-rw-r--r-- | lib/compilers/nim.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/compilers/nim.js b/lib/compilers/nim.js index c24c8da1f..8a7745fe6 100644 --- a/lib/compilers/nim.js +++ b/lib/compilers/nim.js @@ -47,10 +47,6 @@ class NimCompiler extends BaseCompiler { } filterUserOptions(userOptions) { - return userOptions.filter(option => !['--run', '-r'].includes(option)); - } - - runCompiler(compiler, options, inputFilename, execOptions) { //Allowed commands const commands = [ "compile", "compileToC", "c", @@ -61,11 +57,11 @@ class NimCompiler extends BaseCompiler { ]; //If none of the allowed commands is present in userOptions compile to C++ - if (_.intersection(options, commands).length === 0) { - options.unshift("compileToCpp"); + if (_.intersection(userOptions, commands).length === 0) { + userOptions.unshift("compileToCpp"); } - return super.runCompiler(compiler, options, inputFilename, execOptions); + return userOptions.filter(option => !['--run', '-r'].includes(option)); } postProcess(result, outputFilename, filters) { |