diff --git a/README.md b/README.md index e3eea20..ec3d1db 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,7 @@ Options are optionally set in `options`, which is a semicolon-delimited list of - `e` prints the result of evaluating the code - `julia` Julia (Julia 1.1.0) - `e` prints the result of evaluating the code +- `lua` (Lua 5.3) - `pas` Pascal (FPC 3.0.4) - `php` PHP (PHP 7.3.3) - `pl` Perl (Perl 5.28.1) diff --git a/docker/lua/Dockerfile b/docker/lua/Dockerfile new file mode 100644 index 0000000..0835675 --- /dev/null +++ b/docker/lua/Dockerfile @@ -0,0 +1,6 @@ +FROM alpine + +RUN apk update +RUN apk add lua5.3 + +COPY run.sh /var/run/ diff --git a/docker/lua/run.sh b/docker/lua/run.sh new file mode 100644 index 0000000..39c3e24 --- /dev/null +++ b/docker/lua/run.sh @@ -0,0 +1,2 @@ +echo "$1" > program.lua +lua5.3 program.lua diff --git a/src/languages/lua.js b/src/languages/lua.js new file mode 100644 index 0000000..f630ece --- /dev/null +++ b/src/languages/lua.js @@ -0,0 +1,11 @@ +const Language = require('../struct/Language'); + +class Lua extends Language { + constructor() { + super('lua', { + aliases: ['lua'] + }); + } +} + +module.exports = Lua;