diff --git a/README.md b/README.md index 01bc100..8bc534b 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ console.log(new Foo().bar); One of the following language codes is set in `lang`. Options are optionally set in `options`, which is a semicolon-delimited list of `flag` or `flag=value`. +- `bash` Bash (Bash 5.0.2) - `c` C (GCC 8.2.0) - `clj` Clojure (Clojure 1.10) - `cpp` C++ (G++ 8.2.0) @@ -69,6 +70,8 @@ Options are optionally set in `options`, which is a semicolon-delimited list of - `harmony` enables harmony features (`--harmony` on node) - `e` prints the result of evaluating the code - `pas` Pascal (FPC 3.0.4) +- `php` PHP (PHP 7.3.3) +- `pl` Perl (Perl 5.28.1) - `py` Python (CPython 3.7.2, CPython 2.7.16) - `2` runs Python 2 instead of Python 3 - `rb` Ruby (Ruby 2.6.2) diff --git a/docker/bash/Dockerfile b/docker/bash/Dockerfile new file mode 100644 index 0000000..91e3a11 --- /dev/null +++ b/docker/bash/Dockerfile @@ -0,0 +1,4 @@ +FROM bash +LABEL author="1Computer1" + +COPY run.sh /var/run/ diff --git a/docker/bash/run.sh b/docker/bash/run.sh new file mode 100644 index 0000000..05fbe98 --- /dev/null +++ b/docker/bash/run.sh @@ -0,0 +1,2 @@ +echo "$1" > program.sh +bash program.sh diff --git a/docker/perl/Dockerfile b/docker/perl/Dockerfile new file mode 100644 index 0000000..2826c4e --- /dev/null +++ b/docker/perl/Dockerfile @@ -0,0 +1,4 @@ +FROM perl:slim +LABEL author="1Computer1" + +COPY run.sh /var/run/ diff --git a/docker/perl/run.sh b/docker/perl/run.sh new file mode 100644 index 0000000..6e9c849 --- /dev/null +++ b/docker/perl/run.sh @@ -0,0 +1,2 @@ +echo "$1" > program.pl +perl program.pl diff --git a/docker/php/Dockerfile b/docker/php/Dockerfile new file mode 100644 index 0000000..980d994 --- /dev/null +++ b/docker/php/Dockerfile @@ -0,0 +1,4 @@ +FROM php:alpine +LABEL author="1Computer1" + +COPY run.sh /var/run/ diff --git a/docker/php/run.sh b/docker/php/run.sh new file mode 100644 index 0000000..0e00fd1 --- /dev/null +++ b/docker/php/run.sh @@ -0,0 +1 @@ +php -r "$1" diff --git a/src/languages/bash.js b/src/languages/bash.js new file mode 100644 index 0000000..d9cfffd --- /dev/null +++ b/src/languages/bash.js @@ -0,0 +1,11 @@ +const Language = require('../struct/Language'); + +class Bash extends Language { + constructor() { + super('bash', { + aliases: ['bash', 'sh'] + }); + } +} + +module.exports = Bash; diff --git a/src/languages/perl.js b/src/languages/perl.js new file mode 100644 index 0000000..ac6c7d9 --- /dev/null +++ b/src/languages/perl.js @@ -0,0 +1,11 @@ +const Language = require('../struct/Language'); + +class Perl extends Language { + constructor() { + super('perl', { + aliases: ['perl', 'pl'] + }); + } +} + +module.exports = Perl; diff --git a/src/languages/php.js b/src/languages/php.js new file mode 100644 index 0000000..70628a8 --- /dev/null +++ b/src/languages/php.js @@ -0,0 +1,11 @@ +const Language = require('../struct/Language'); + +class PHP extends Language { + constructor() { + super('php', { + aliases: ['php'] + }); + } +} + +module.exports = PHP;