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)
- `harmony` enables harmony features (`--harmony` on node)
- `julia` Julia
- `e` prints the result of evaluating the code
- `lisp` Racket
- `lua` Lua
- `ocaml` OCaml

View file

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

View file

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