Language Core
Functions, closures, models, lists, maps, imports, and a compact standard library.
One Piece Language
OPL combines concise pirate syntax with a production-style toolchain: an AST interpreter, bytecode VM, closures, models, collections, diagnostics, debugger integration, a standard library, and VSCode support.
bounty x = 5
say x + 1
dfruit add(a, b):
return a + b
say add(2, 3)
Functions, closures, models, lists, maps, imports, and a compact standard library.
Run through the AST interpreter or opt into the stack-based bytecode VM and `.oplb` files.
Use diagnostics, autocomplete, file icons, run/debug buttons, LSP support, and DAP debugging in VSCode.
Install
python -m pip install oplang
opl run app.opl
opl build app.opl
opl run app.oplb --vm
Examples
dfruit add(a, b):
return a + b
say add(2, 3)
model Pirate:
dfruit spawn(name):
captain.name = name
dfruit greet():
say captain.name
bounty crew = ["Luffy", "Zoro"]
append(crew, "Nami")
for member in crew:
say member
Playground