Add OCaml
This commit is contained in:
parent
9269d30595
commit
7106c3f5ac
4 changed files with 18 additions and 0 deletions
|
@ -73,6 +73,7 @@ Options are optionally set in `options`, which is a semicolon-delimited list of
|
||||||
- `e` prints the result of evaluating the code
|
- `e` prints the result of evaluating the code
|
||||||
- `kotlin` Kotlin (Kotlin 1.3)
|
- `kotlin` Kotlin (Kotlin 1.3)
|
||||||
- `lua` Lua (Lua 5.3)
|
- `lua` Lua (Lua 5.3)
|
||||||
|
- `ocaml` OCaml (OCaml 4.0.6)
|
||||||
- `pas` Pascal (FPC 3.0.4)
|
- `pas` Pascal (FPC 3.0.4)
|
||||||
- `php` PHP (PHP 7.3.3)
|
- `php` PHP (PHP 7.3.3)
|
||||||
- `pl` Perl (Perl 5.28.1)
|
- `pl` Perl (Perl 5.28.1)
|
||||||
|
|
4
docker/ocaml/Dockerfile
Normal file
4
docker/ocaml/Dockerfile
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
FROM frolvlad/alpine-ocaml
|
||||||
|
LABEL author="1Computer1"
|
||||||
|
|
||||||
|
COPY run.sh /var/run/
|
2
docker/ocaml/run.sh
Normal file
2
docker/ocaml/run.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
echo "$1" > program.ml
|
||||||
|
ocamlopt -cclib --static -o program program.ml && ./program
|
11
src/languages/ocaml.js
Normal file
11
src/languages/ocaml.js
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
const Language = require('../struct/Language');
|
||||||
|
|
||||||
|
class OCaml extends Language {
|
||||||
|
constructor() {
|
||||||
|
super('ocaml', {
|
||||||
|
aliases: ['ocaml']
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = OCaml;
|
Loading…
Reference in a new issue