Luno is a general-purpose, interpreted scripting language inspired by Python. It features clean, indentation-based syntax with first-class functions, classes with inheritance, string interpolation, and pattern matching.
- Clean syntax — Indentation-based blocks, no semicolons, no braces
- First-class functions — Closures, lambdas (
lam x => x * 2), default args - Classes & inheritance —
class Dog(Animal):withself-based methods - String interpolation —
`Hello, ${name}!`with backtick strings - Pattern matching —
match/caseexpressions - Error handling —
try/catch/finallywith custom error types - Immutability —
letfor mutable,constfor immutable bindings - Built-in functions —
print,input,len,range,type, and more - Interactive REPL — Explore Luno interactively with
luno repl
git clone https://github.com/IMDevFlare/luno
cd luno
cargo build --releaseThe binary will be at ./target/release/luno.
# Using the run subcommand
cargo run -- run examples/hello.luno
# Or directly
cargo run -- examples/hello.luno
# With the built binary
./target/release/luno run examples/hello.lunoSupported file extensions: .luno, .ln
cargo run -- repl
# or just
cargo run🌙 Luno v0.1.0 — Interactive REPL
Type 'exit' or Ctrl+C to quit.
luno> print("Hello from Luno!")
Hello from Luno!
luno> let x = 42
luno> print(x * 2)
84
let name = "world"
print(`Hello, ${name}!`)
fn factorial(n: int) -> int:
if n <= 1:
return 1
return n * factorial(n - 1)
print(factorial(10))
class Animal:
fn init(self, name: str):
self.name = name
fn speak(self):
print(`${self.name} makes a sound.`)
class Dog(Animal):
fn speak(self):
print(`${self.name} barks!`)
let d = Dog("Rex")
d.speak()
Output:
Hello, world!
3628800
Rex barks!
luno/
├── Cargo.toml # Rust project manifest
├── src/
│ ├── main.rs # CLI entry point (run / repl)
│ ├── lexer.rs # Tokenizer with indentation tracking
│ ├── parser.rs # Recursive-descent parser → AST
│ ├── interpreter.rs # Tree-walking evaluator
│ └── repl.rs # Interactive REPL loop
├── examples/
│ └── hello.luno # Example program
├── GRAMMAR.md # Complete language grammar reference
├── CHANGELOG.md # Version history
└── TODO.md # Roadmap and planned features