Add Bash, PHP, Perl
This commit is contained in:
parent
bb8e6d5cfa
commit
c8048b3a08
10 changed files with 53 additions and 0 deletions
|
@ -54,6 +54,7 @@ console.log(new Foo().bar);
|
||||||
One of the following language codes is set in `lang`.
|
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`.
|
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)
|
- `c` C (GCC 8.2.0)
|
||||||
- `clj` Clojure (Clojure 1.10)
|
- `clj` Clojure (Clojure 1.10)
|
||||||
- `cpp` C++ (G++ 8.2.0)
|
- `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)
|
- `harmony` enables harmony features (`--harmony` on node)
|
||||||
- `e` prints the result of evaluating the code
|
- `e` prints the result of evaluating the code
|
||||||
- `pas` Pascal (FPC 3.0.4)
|
- `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)
|
- `py` Python (CPython 3.7.2, CPython 2.7.16)
|
||||||
- `2` runs Python 2 instead of Python 3
|
- `2` runs Python 2 instead of Python 3
|
||||||
- `rb` Ruby (Ruby 2.6.2)
|
- `rb` Ruby (Ruby 2.6.2)
|
||||||
|
|
4
docker/bash/Dockerfile
Normal file
4
docker/bash/Dockerfile
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
FROM bash
|
||||||
|
LABEL author="1Computer1"
|
||||||
|
|
||||||
|
COPY run.sh /var/run/
|
2
docker/bash/run.sh
Normal file
2
docker/bash/run.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
echo "$1" > program.sh
|
||||||
|
bash program.sh
|
4
docker/perl/Dockerfile
Normal file
4
docker/perl/Dockerfile
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
FROM perl:slim
|
||||||
|
LABEL author="1Computer1"
|
||||||
|
|
||||||
|
COPY run.sh /var/run/
|
2
docker/perl/run.sh
Normal file
2
docker/perl/run.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
echo "$1" > program.pl
|
||||||
|
perl program.pl
|
4
docker/php/Dockerfile
Normal file
4
docker/php/Dockerfile
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
FROM php:alpine
|
||||||
|
LABEL author="1Computer1"
|
||||||
|
|
||||||
|
COPY run.sh /var/run/
|
1
docker/php/run.sh
Normal file
1
docker/php/run.sh
Normal file
|
@ -0,0 +1 @@
|
||||||
|
php -r "$1"
|
11
src/languages/bash.js
Normal file
11
src/languages/bash.js
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
const Language = require('../struct/Language');
|
||||||
|
|
||||||
|
class Bash extends Language {
|
||||||
|
constructor() {
|
||||||
|
super('bash', {
|
||||||
|
aliases: ['bash', 'sh']
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = Bash;
|
11
src/languages/perl.js
Normal file
11
src/languages/perl.js
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
const Language = require('../struct/Language');
|
||||||
|
|
||||||
|
class Perl extends Language {
|
||||||
|
constructor() {
|
||||||
|
super('perl', {
|
||||||
|
aliases: ['perl', 'pl']
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = Perl;
|
11
src/languages/php.js
Normal file
11
src/languages/php.js
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
const Language = require('../struct/Language');
|
||||||
|
|
||||||
|
class PHP extends Language {
|
||||||
|
constructor() {
|
||||||
|
super('php', {
|
||||||
|
aliases: ['php']
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = PHP;
|
Loading…
Reference in a new issue