0.8.2 • Published 2 years ago

uguisu-js v0.8.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Uguisu

The Uguisu is a statically typed scripting language.
Not ready to use yet.

The syntax is like this:

fn calc(x: number): number {
    if x == 0 {
        return 1;
    } else {
        return calc(x - 1) * 2;
    }
}

fn main() {
    var value = 10;
    printNum(calc(value));
}

Syntaxes

Install

Node.js and npm installation is required.
Local installation is also ok if only the JavaScript API is used.

$ npm i -g uguisu-js

Command line

Usage: uguisu [options] [commands]

Examples:
    uguisu run -l <projectDir>
    uguisu lint <projectDir>
    uguisu <command> -h
    uguisu -v

Options:
    -h, --help          Print help message.
    -v, --version       Print Uguisu version.

Commands:
    run                 Run a uguisu project.
    lint                Perform the lint for a project.

Run the basic example:

$ uguisu run -l ./examples/basic

JavaScript API

Uguisu only supports the ES Modules (ESM).

import { Uguisu } from 'uguisu-js';

const uguisu = new Uguisu({
    stdout(str) {
        console.log(str);
    }
});

const projectDir = './examples/basic';

// lint (static analysis)
uguisu.lint(projectDir);

// Run
uguisu.run(projectDir);

License

MIT License

0.8.2

2 years ago

0.8.1

2 years ago

0.8.0-alpha.6

2 years ago

0.8.0-alpha.5

2 years ago

0.8.0-alpha.4

2 years ago

0.8.0-alpha.3

2 years ago

0.8.0-alpha.2

2 years ago

0.8.0-alpha.1

2 years ago

0.7.0

2 years ago

0.7.0-alpha.8

2 years ago

0.7.0-alpha.7

2 years ago

0.7.0-alpha.6

2 years ago

0.7.0-alpha.5

2 years ago

0.7.0-alpha.4

2 years ago

0.7.0-alpha.3

2 years ago

0.7.0-alpha.2

2 years ago

0.7.0-alpha.1

2 years ago