1.2.4-U1 • Published 12 months ago

ravenlang v1.2.4-U1

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

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

1.2.4-U1

12 months ago

1.2.4

12 months ago

1.2.2

12 months ago

1.2.1

12 months ago

1.2.0

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago