0.16.1 • Published 5 months ago

@forthic/interp v0.16.1

Weekly downloads
-
License
BSD-2-Clause
Repository
github
Last release
5 months ago

@forthic/interp

A Forthic interpreter that runs within TypeScript.

Description

This package provides a Forthic interpreter that allows you to execute Forthic code within your JavaScript/TypeScript projects. Forthic is a stack-based programming language inspired by Forth.

Installation

You can install the package using npm:

npm install @forthic/interp

Or using yarn:

yarn add @forthic/interp

Usage

Here's a basic example of how to use the Forthic interpreter:

import { Interpreter } from "@forthic/interp"


(async () => {
    const interp = new Interpreter();
    await interp.run("[1 2 3] '3 *' MAP");
    const result = interp.stack_pop();
    console.log("Howdy!", {result});
})();

// Output:
//
// Howdy! { result: [ 3, 6, 9 ] }

License

This project is licensed under the BSD-2-Clause License see the LICENSE file for details.

Author

Rino Jose

Links

0.16.1

5 months ago

0.16.0

5 months ago

0.15.0

6 months ago

0.14.0

7 months ago

0.13.0

7 months ago

0.12.0

8 months ago

0.11.1

8 months ago

0.11.0

8 months ago

0.10.0

8 months ago

0.9.0

8 months ago

0.8.2

8 months ago

0.8.1

8 months ago

0.8.0

8 months ago

0.7.0

8 months ago

0.6.0

8 months ago

0.5.0

8 months ago

0.4.0

9 months ago

0.3.0

9 months ago

0.2.0

11 months ago

0.1.0

11 months ago