ospl

Crates.ioospl
lib.rsospl
version0.2.0
created_at2025-09-19 22:20:28.761524+00
updated_at2025-11-06 00:10:05.994305+00
descriptionthe (UNFINISHED!!!) OSPL programming language
homepagehttps://ospl-lang.github.io
repository
max_upload_size
id1847188
size245,591
(11pepi)

documentation

README

OSPL

A programming language with a Rust-based interpreter.

Building

cargo build

Running Programs

./target/debug/ospl run <file.ospl>
./target/debug/ospl run test.ospl

Alternative commands:

  • exe or r - run a file with statements
  • run-expr - run a file as an expression
  • run-stmt - run a file as a single statement

Syntax

Comments:

  • # for line comments
  • ***** multiline ***** for block comments

Variables:

def x = 10;
x = 20;  # reassignment

Functions:

def add = fn((a, b), c) {
    return a + b + c;
};

Control flow:

if condition {
    # code
} else if other {
    # code
} else {
    # code
};

select value {
    case (pattern) {
        # code
    }
    case (_) {
        # default case
    }
};

loop {
    # infinite loop
};

VS Code Extension

Install the .vsix file for syntax highlighting.

or compile it with:

cd vscode/ospl-vscode && npx vsce package | cat
Commit count: 0

cargo fmt