mani-language / Mani

Máni ... an awesome, super simple programming language!
https://mani-language.github.io/
Mozilla Public License 2.0
28 stars 7 forks source link
general-programming general-purpose hacktoberfest help-wanted interpreted-programming-language interpreter language lexer new parser programming-language standard-library

Máni

Máni

Version 1.3.0

An awesome, super simple language!

What is it?

Máni is an interpreted language that is simple to learn, and easy to use.

The idea behind it is, take some of the good parts of other languages like nodejs, c++, python etc. Implement them into this, and try and build an "Alpha" language... if that is even a such thing.

What Máni code looks like.

# "arrays";

class Vector {
    Vector(a, b, c) {
        this.x = a;
        this.y = b;
        this.z = c;
    }

    get() {
        return [this.x, this.y, this.z];
    }

    add(v) {
        if (v is "list") {
            return Vector(this.x+v.at(0), this.y+v.at(1), this.z+v.at(2));
        } else if (v is "number") {
            return Vector(this.x + v, this.y + v, this.z + v);
        } else if (v is "vector") {
            return Vector(this.x + v.x, this.y + v.y, this.z + v.z);
        }
        return nil;
    }

    show() {
        return "[" + this.x + "," + this.y +"," + this.z + "]";
    }

}

let v1 = Vector(1, 2, 3);
let v2 = Vector(4, 5, 6);
let v3 = v1 + v2;

say v1 + " + " + v2 + " = " + v3;

Checkout some more examples of Mani code and submit your own here.

Syntax highlighting

ATOM VSCODE

Team

Brayden Moon Joe Rickard Odin
Founder Contributor Faithful Builder
Github Github Github