Skip to main content

Built and signed on GitHub Actions

It is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Node.js
It is unknown whether this package works with Deno
It is unknown whether this package works with Bun
It is unknown whether this package works with Browsers
JSR Score
52%
Published
10 months ago (0.0.1)

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

leo-lang

A simple ARM-inspired programming language which runs in JS.

Installation

npm

npx jsr add @mapokapo/leo-lang

Deno

deno add @mapokapo/leo-lang

Bun

bunx jsr add @mapokapo/leo-lang

Usage

import { parseProgram } from "@mapokapo/leo-lang";
import Machine from "@mapokapo/leo-lang/machine";
// or in Deno
import { parseProgram } from "jsr:@mapokapo/leo-lang@^0.0.1";
import Machine from "jsr:@mapokapo/leo-lang/machine@^0.0.1";

const operations = parseProgram(`
	ldv r0, #1
	ldv r1, #2
	add r2, r0, r1
	st r2, #0
`);

const machine = new Machine(operations);

while (true) {
  if (machine.execute()) {
    break;
  }
}

machine.printRegisterTable();
machine.printFlagTable();
machine.printMemoryTable();
Built and signed on
GitHub Actions
View transparency log

Add Package

deno add jsr:@mapokapo/leo-lang

Import symbol

import * as leo_lang from "@mapokapo/leo-lang";

---- OR ----

Import directly with a jsr specifier

import * as leo_lang from "jsr:@mapokapo/leo-lang";

Add Package

npx jsr add @mapokapo/leo-lang

Import symbol

import * as leo_lang from "@mapokapo/leo-lang";

Add Package

yarn dlx jsr add @mapokapo/leo-lang

Import symbol

import * as leo_lang from "@mapokapo/leo-lang";

Add Package

pnpm dlx jsr add @mapokapo/leo-lang

Import symbol

import * as leo_lang from "@mapokapo/leo-lang";

Add Package

bunx jsr add @mapokapo/leo-lang

Import symbol

import * as leo_lang from "@mapokapo/leo-lang";