ravenlang
v1.2.4-U1
Published
Raven is a language focused on clean syntax, expressiveness, and simplicity.
Downloads
8
Maintainers
Readme
Raven
Raven is a language focused on clean syntax, expressiveness, and simplicity.
No config file required, can easily integrate into existing Node/Bun/etc... projects.
Compiles to JS.
Site: https://ravenlang.pages.dev
Git: https://github.com/navid-nm/raven
VSCode Extension (Recommended): https://marketplace.visualstudio.com/items?itemName=NavidM.ravenlang
Installation and Usage
npm install -g ravenlang
Run raven
in commandline without any args to compile all .rn files in current dir and containing subdirs to .js.
To run .rn files directly run "raven -r file.rn".
Examples
Simple example:
fn add(x, y) = x + y
fn main() {
val result = add(1, 2)
if (result == 3) {
say("will always print")
}
}
Transpiles to the following JS:
"use strict";
function add(x, y) {
return x + y;
}
function main() {
const result = add(1, 2);
if (result === 3) {
console.log("will always print");
}
}
Types:
let x :: number = 2
fn hello(world:: string) -> string {
return world
}
fn sayBack(world:: string) -> string {
return world
}
fn doStuffInline(test:: string) -> string = test
© 2024 Navid M