greyscript-interpreter
v3.0.1
Published
Interpreter
Downloads
628
Readme
greyscript-interpreter
A bytecode interpreter for GreyScript (the Grey Hack flavour of MiniScript) written in TypeScript. It extends greybel-interpreter with GreyScript-specific parsing and bytecode generation via greyscript-core.
Features
- Extends
greybel-interpreterwith GreyScript-aware parsing and compilation - Uses the GreyScript parser for bytecode generation and code injection
- Adds
classID-basedtoStringbehaviour forCustomMapinstances - Inherits all greybel-interpreter capabilities: stack-based VM, debugger, pluggable handlers, environment variables, and custom intrinsics
- Written in TypeScript with type definitions included
Install
npm install greyscript-interpreterUsage
import { Interpreter } from 'greyscript-interpreter';
import { HandlerContainer } from 'greybel-interpreter';
const interpreter = new Interpreter({
target: '/path/to/main.src',
handler: new HandlerContainer(),
environmentVariables: new Map([['MY_VAR', '123']])
});
await interpreter.run();Testing
npm test