Skip to content

ohua-dev/alang-clike-parser

Repository files navigation

Parses a C/Rust like language into ALang

Build Status

An example of a standalone Ohua module in the C/Rust like syntax.

ns some_ns;

use sf ohua.math::{add, isZero, plus};
use algo some::module::anAlgo;

fn sqare (x) {
    add(x, x)
}

fn algo1 (someParam) {
    let a = square(anAlgo(someParam));

    let coll0 = for i in coll {
        square(i)
    };

    let plusThree = | a | { plus(a, 3) };

    if (isZero(plusThree(a))) {
        coll0
    } else {
        a
    }

}

fn main (param) {
    algo0(param)
}

About

Parse a C/Rust like DSL to ALang

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published