1.0.8 • Published 3 years ago

@nix2/zuse-stdsyntax v1.0.8

Weekly downloads
8
License
CC-BY-1.0
Repository
github
Last release
3 years ago

Installation

yarn add @nix2/zuse-stdsyntax-typescript

About

This is used to parse Zuse Stardard Syntax into the Zuse Program Structure.

All this package does is convert a string of the program into an Abstract Syntax Tree which can be run with a Zuse Interpreter.

Usage

import { parse } from '@nix2/zuse-stdsyntax';

const code = `Stdout("Hi World!");`;

const [tokens, error] = parse('<stdin>', code);

console.log(tokens);

Output:

[
    "Call",
    {
        "func": [
            "Var",
            {
                "name": "Stdout"
            }
        ],
        "args": [
            [
                "Text",
                {
                    "value": "Hi World!"
                }
            ]
        ],
        "kwargs": {}
    }
]

Grammer

The grammer can be found here

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.0

3 years ago