Fix Julia evaluation

This commit is contained in:
1computer1 2019-06-23 00:27:12 -04:00
parent d0470e084f
commit 0dd7f992be
3 changed files with 2 additions and 18 deletions

View file

@ -82,7 +82,6 @@ Options are optionally set in `options`, which is a semicolon-delimited list of
- `js` JavaScript (Node) - `js` JavaScript (Node)
- `harmony` enables harmony features (`--harmony` on node) - `harmony` enables harmony features (`--harmony` on node)
- `julia` Julia - `julia` Julia
- `e` prints the result of evaluating the code
- `lisp` Racket - `lisp` Racket
- `lua` Lua - `lua` Lua
- `ocaml` OCaml - `ocaml` OCaml

View file

@ -1,5 +1 @@
if [ "$EVAL_EXPR" = "true" ]; then printf %s "$1" | julia
printf %s "$1" | julia -E || true
else
printf %s "$1" | julia -e || true
fi

View file

@ -4,20 +4,9 @@ class Julia extends Language {
constructor() { constructor() {
super('julia', { super('julia', {
name: 'Julia', name: 'Julia',
aliases: ['julia'], aliases: ['julia']
options: {
e: () => ''
}
}); });
} }
runWith(options) {
if (options.has('e')) {
return { env: { EVAL_EXPR: 'true' } };
}
return {};
}
} }
module.exports = Julia; module.exports = Julia;