Fix Julia evaluation
This commit is contained in:
parent
d0470e084f
commit
0dd7f992be
3 changed files with 2 additions and 18 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue