From 17e5eade085c0290fbe1b820a98ed39aae94a41a Mon Sep 17 00:00:00 2001 From: 1computer1 Date: Fri, 15 Mar 2019 22:06:49 -0400 Subject: [PATCH] Add Racket --- README.md | 1 + docker/racket/Dockerfile | 4 ++++ docker/racket/run.sh | 2 ++ src/languages/racket.js | 11 +++++++++++ 4 files changed, 18 insertions(+) create mode 100644 docker/racket/Dockerfile create mode 100644 docker/racket/run.sh create mode 100644 src/languages/racket.js diff --git a/README.md b/README.md index 0f0f818..261522e 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,7 @@ Options are optionally set in `options`, which is a semicolon-delimited list of - `julia` Julia (Julia 1.1.0) - `e` prints the result of evaluating the code - `kotlin` Kotlin (Kotlin 1.3) +- `lisp` Racket (Racket 7.2) - `lua` Lua (Lua 5.3) - `ocaml` OCaml (OCaml 4.0.6) - `pas` Pascal (FPC 3.0.4) diff --git a/docker/racket/Dockerfile b/docker/racket/Dockerfile new file mode 100644 index 0000000..4e26694 --- /dev/null +++ b/docker/racket/Dockerfile @@ -0,0 +1,4 @@ +FROM jackfirth/racket +LABEL author="1Computer1" + +COPY run.sh /var/run/ diff --git a/docker/racket/run.sh b/docker/racket/run.sh new file mode 100644 index 0000000..cb37584 --- /dev/null +++ b/docker/racket/run.sh @@ -0,0 +1,2 @@ +echo "$1" > program.rkt +racket program.rkt diff --git a/src/languages/racket.js b/src/languages/racket.js new file mode 100644 index 0000000..be8f64a --- /dev/null +++ b/src/languages/racket.js @@ -0,0 +1,11 @@ +const Language = require('../struct/Language'); + +class Racket extends Language { + constructor() { + super('racket', { + aliases: ['lisp'] + }); + } +} + +module.exports = Racket;