diff options
author | Simon Brand <simon@codeplay.com> | 2017-05-31 14:26:39 +0100 |
---|---|---|
committer | Simon Brand <simon@codeplay.com> | 2017-05-31 14:26:39 +0100 |
commit | fae0b0dba6a7e2874137f3c16af367c4b7d0b3a9 (patch) | |
tree | 66b155f0a6a1ed8c834fe58d6371e5f39c0907a1 /lib/compile-handler.js | |
parent | 703a5e769fcfbc846608c79b0200e62d2b74ccad (diff) | |
download | compiler-explorer-fae0b0dba6a7e2874137f3c16af367c4b7d0b3a9.tar.gz compiler-explorer-fae0b0dba6a7e2874137f3c16af367c4b7d0b3a9.zip |
Enable AST generation only if the user has an AST view open
This adds the notion of backend options which can be sent from the UI to the backend in addition to the actual compiler options.
Diffstat (limited to 'lib/compile-handler.js')
-rw-r--r-- | lib/compile-handler.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compile-handler.js b/lib/compile-handler.js index a9679c556..f36ce0a07 100644 --- a/lib/compile-handler.js +++ b/lib/compile-handler.js @@ -96,6 +96,7 @@ function CompileHandler(gccProps, compilerProps) { if (!compiler) return next(); source = req.body.source; options = req.body.options; + backendOptions = req.body.backendOptions; filters = req.body.filters || compiler.getDefaultFilters(); } else { // API-style @@ -144,7 +145,7 @@ function CompileHandler(gccProps, compilerProps) { return _.pluck(array || [], 'text').join("\n"); } - compiler.compile(source, options, filters).then( + compiler.compile(source, options, backendOptions, filters).then( function (result) { if (req.accepts(['text', 'json']) === 'json') { res.set('Content-Type', 'application/json'); |