Merge branch 'master' of https://github.com/1Computer1/comp_iler
This commit is contained in:
commit
19038ceca8
8 changed files with 55 additions and 0 deletions
|
@ -62,6 +62,7 @@ One of the following languages is set in `lang`.
|
|||
- `js` JavaScript (Node 10.14.2)
|
||||
- `py` Python (CPython 3.6.8)
|
||||
- `hs` Haskell (GHC 8.4.3)
|
||||
- `pas` Pascal (FPC 3.0.4)
|
||||
|
||||
## Options
|
||||
|
||||
|
@ -76,6 +77,9 @@ For Python:
|
|||
For Haskell:
|
||||
- None
|
||||
|
||||
For Pascal:
|
||||
- None
|
||||
|
||||
## Packages
|
||||
|
||||
Apart from the standard libraries, some other libraries come pre-installed.
|
||||
|
@ -100,3 +104,6 @@ For Haskell:
|
|||
- scientific
|
||||
- split
|
||||
- vector
|
||||
|
||||
For Pascal:
|
||||
- None
|
5
docker/go/Dockerfile
Normal file
5
docker/go/Dockerfile
Normal file
|
@ -0,0 +1,5 @@
|
|||
FROM golang:alpine
|
||||
LABEL author="1Computer1"
|
||||
|
||||
COPY run.sh /var/run/
|
||||
WORKDIR /var/ws
|
2
docker/go/run.sh
Normal file
2
docker/go/run.sh
Normal file
|
@ -0,0 +1,2 @@
|
|||
echo "$1" > program.go
|
||||
go run program.go
|
5
docker/pascal/Dockerfile
Normal file
5
docker/pascal/Dockerfile
Normal file
|
@ -0,0 +1,5 @@
|
|||
FROM frolvlad/alpine-fpc
|
||||
LABEL author="SpaceEEC"
|
||||
|
||||
COPY run.sh /var/run/
|
||||
WORKDIR /var/ws
|
11
docker/pascal/run.sh
Normal file
11
docker/pascal/run.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
echo "$1" > program.pas
|
||||
|
||||
# fpc does not use stderr, ld however does, capture both
|
||||
res="$(fpc program.pas 2>&1)"
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
./program
|
||||
else
|
||||
echo "$res"
|
||||
exit 1
|
||||
fi
|
|
@ -31,6 +31,7 @@ class HelpCommand extends Command {
|
|||
'- JavaScript',
|
||||
'- Python',
|
||||
'- Haskell',
|
||||
'- Go',
|
||||
'',
|
||||
'Read the readme for more information: <https://github.com/1Computer1/comp_iler>'
|
||||
]);
|
||||
|
|
12
src/languages/go.js
Normal file
12
src/languages/go.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
const Language = require('../struct/Language');
|
||||
|
||||
class Go extends Language {
|
||||
constructor() {
|
||||
super('go', {
|
||||
highlight: 'go',
|
||||
aliases: ['go']
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Go;
|
12
src/languages/pascal.js
Normal file
12
src/languages/pascal.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
const Language = require('../struct/Language');
|
||||
|
||||
class Pascal extends Language {
|
||||
constructor() {
|
||||
super('pascal', {
|
||||
highlight: 'pas',
|
||||
aliases: ['pascal', 'pas']
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Pascal;
|
Loading…
Reference in a new issue