From 08a7dbdaee2c118d8fb2af76e1b2b478bed5eb85 Mon Sep 17 00:00:00 2001 From: Radon Rosborough Date: Sat, 3 Oct 2020 20:57:39 -0700 Subject: [PATCH] [#24] New language: Oberon --- backend/src/langs.ts | 16 ++++++++++++++++ scripts/docker-install-phase3c.bash | 4 ++++ scripts/docker-install-phase6.bash | 10 ++++++++++ 3 files changed, 30 insertions(+) diff --git a/backend/src/langs.ts b/backend/src/langs.ts index 27ff866..a182ed2 100644 --- a/backend/src/langs.ts +++ b/backend/src/langs.ts @@ -2293,6 +2293,22 @@ x`, compile: "nim compile main.nim", run: "./main", template: `echo "Hello, world!" +`, + }, + oberon: { + aliases: ["obn"], + name: "Oberon", + main: "Main.obn", + compile: "obnc Main.obn -o main", + run: "./main", + template: `MODULE Main; + +IMPORT Out; + +BEGIN + Out.String("Hello, world!"); + Out.Ln; +END Main. `, }, objectivec: { diff --git a/scripts/docker-install-phase3c.bash b/scripts/docker-install-phase3c.bash index b0b80d4..4f8fb39 100755 --- a/scripts/docker-install-phase3c.bash +++ b/scripts/docker-install-phase3c.bash @@ -46,6 +46,10 @@ nim nodejs yarn +# Oberon +clang +make + # Objective-C gcc gnustep-devel diff --git a/scripts/docker-install-phase6.bash b/scripts/docker-install-phase6.bash index 95d3fb4..c2d553a 100755 --- a/scripts/docker-install-phase6.bash +++ b/scripts/docker-install-phase6.bash @@ -93,6 +93,16 @@ git clone https://github.com/bipinu/malbolge.git clang malbolge/malbolge.c -o /usr/local/bin/malbolge rm -rf malbolge +# Oberon +file="$(curl -sSL https://miasap.se/obnc/ | grep -F obnc_ | grep -Eo 'obnc_[^"]+' | grep -v win | head -n1)" +wget -nv "https://miasap.se/obnc/downloads/${file}" +tar -xf obnc_*.tar.gz +pushd obnc-* >/dev/null +./build +./install +popd >/dev/null +rm -rf obnc_*.tar.gz obnc-* + # Ook git clone https://git.code.sf.net/p/esco/code esco pushd esco >/dev/null