Pirat is a fully interpreted pirate-themed programming language with syntax loosely inspired by python. This implementation uses a recursive top-down parser (Pratt), and tree-walking evaluator. And before you ask, there are no other implementations and the language itself is not very well defined.
yar greeting be f(x):
gives 'Hello ' + x + "!".
.
greeting('world!').
yar i be 0.
4 i < 10:
if i = 6:
break.
.
i be i + 1
.
yar arrrrr be [1, "2", (1+2), [1, 2, 3]].
arrrrr[0] be 2.
yar map be {"key1": 1, "key2": 2}.
map["key3"] be "three".
if nay <> ay:
ahoy("false is not equal to true").
lsif i = 1:
ahoy("i equals 1").
ls:
ahoy("Else block hit").
.
chest myChestType|foo, bar|.
yar instance be myChestType|"fooVal", f(): gives "barval"..|.
instance|foo be instance|bar().
You should have golang and make installed
For repl: make repl
With a pir file: make run FILE=<YOUR_PIR_FILE>