diff options
author | Partouf <partouf@gmail.com> | 2018-03-24 12:37:28 +0100 |
---|---|---|
committer | Partouf <partouf@gmail.com> | 2018-04-22 15:15:52 +0200 |
commit | 885a9876fc6af6f30931ad0214e909af6bb4b002 (patch) | |
tree | a8ae845b9acb3d8741edc61556e112e14803e26b /lib/compilers/pascal.js | |
parent | 7ed923d50ded62de02186f2f5993a6618502c13d (diff) | |
download | compiler-explorer-885a9876fc6af6f30931ad0214e909af6bb4b002.tar.gz compiler-explorer-885a9876fc6af6f30931ad0214e909af6bb4b002.zip |
unittest fixes
Diffstat (limited to 'lib/compilers/pascal.js')
-rw-r--r-- | lib/compilers/pascal.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/compilers/pascal.js b/lib/compilers/pascal.js index efed23f04..312c8e068 100644 --- a/lib/compilers/pascal.js +++ b/lib/compilers/pascal.js @@ -33,7 +33,12 @@ const BaseCompiler = require('../base-compiler'), class FPCCompiler extends BaseCompiler { constructor(info, env) { super(info, env); - this.demangler = require(this.compilerProps("demanglerClassFile")).Demangler; + + let demanglerClassFile = this.compilerProps("demanglerClassFile"); + if (!demanglerClassFile) demanglerClassFile = "../pascal-support"; + const demanglerClass = require(demanglerClassFile).Demangler; + + this.demangler = new demanglerClass(null, null, this); this.compileFilename = 'output.pas'; this.supportsOptOutput = false; } |