From 37b9f0cf468e31ce0a5b1d7d9a659500b3d4fec2 Mon Sep 17 00:00:00 2001 From: Haydn Ewers <27211+haydn@users.noreply.github.com> Date: Mon, 1 Apr 2019 15:08:58 +1100 Subject: [PATCH] Add ulm-js --- package.json | 2 +- ulm-js/.gitignore | 1 + ulm-js/README.md | 27 +++++++++++++++++++++++++++ ulm-js/package.json | 5 +++++ 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 ulm-js/.gitignore create mode 100644 ulm-js/README.md create mode 100644 ulm-js/package.json diff --git a/package.json b/package.json index 7567baf..ca187fe 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "private": true, - "workspaces": ["ulm-spec"], + "workspaces": ["ulm-spec", "ulm-js"], "scripts": { "build": "yarn workspace ulm-spec run build" } diff --git a/ulm-js/.gitignore b/ulm-js/.gitignore new file mode 100644 index 0000000..07e6e47 --- /dev/null +++ b/ulm-js/.gitignore @@ -0,0 +1 @@ +/node_modules diff --git a/ulm-js/README.md b/ulm-js/README.md new file mode 100644 index 0000000..8842b59 --- /dev/null +++ b/ulm-js/README.md @@ -0,0 +1,27 @@ +ULM.js +------ + +⚠️ WIP ⚠️ + +A JavaScript library for working with a ULM AST. + +```js +import { toLatex } from "ulm-js"; + +toLatex({ + type: 'root', + value: { + type: 'add', + left: { + type: 'int', + value: 2, + }, + right: { + type: 'int', + value: 3, + } + } +}); + +// 2 + 3 +``` diff --git a/ulm-js/package.json b/ulm-js/package.json new file mode 100644 index 0000000..6314ff3 --- /dev/null +++ b/ulm-js/package.json @@ -0,0 +1,5 @@ +{ + "name": "ulm-js", + "version": "0.0.0", + "license": "MIT" +} -- 2.51.2