diff --git a/README.md b/README.md index ec3d1db..829202d 100644 --- a/README.md +++ b/README.md @@ -75,6 +75,7 @@ Options are optionally set in `options`, which is a semicolon-delimited list of - `pas` Pascal (FPC 3.0.4) - `php` PHP (PHP 7.3.3) - `pl` Perl (Perl 5.28.1) +- `prolog` Prolog (SWI-Prolog 8.1.2) - `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/prolog/Dockerfile b/docker/prolog/Dockerfile new file mode 100644 index 0000000..1d0f232 --- /dev/null +++ b/docker/prolog/Dockerfile @@ -0,0 +1,4 @@ +FROM swipl +LABEL author="1Computer1" + +COPY run.sh /var/run/ diff --git a/docker/prolog/run.sh b/docker/prolog/run.sh new file mode 100644 index 0000000..6217036 --- /dev/null +++ b/docker/prolog/run.sh @@ -0,0 +1,2 @@ +echo "$1" > program.pl +swipl --quiet program.pl diff --git a/src/languages/prolog.js b/src/languages/prolog.js new file mode 100644 index 0000000..b5b97d4 --- /dev/null +++ b/src/languages/prolog.js @@ -0,0 +1,11 @@ +const Language = require('../struct/Language'); + +class Prolog extends Language { + constructor() { + super('prolog', { + aliases: ['prolog'] + }); + } +} + +module.exports = Prolog;