From 46741bae238f56d16071462b8dab20f1c36c1691 Mon Sep 17 00:00:00 2001 From: Andrew Alderwick Date: Sun, 16 May 2021 09:39:40 +0100 Subject: [PATCH] Added documentation for Asma helper script --- etc/asma.lua | 5 ----- etc/asma.moon | 20 +++++++++++++++++++- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/etc/asma.lua b/etc/asma.lua index a4437da..dd3a6f3 100644 --- a/etc/asma.lua +++ b/etc/asma.lua @@ -1,8 +1,3 @@ -local band, bor, lshift, rshift -do - local _obj_0 = require('bit') - band, bor, lshift, rshift = _obj_0.band, _obj_0.bor, _obj_0.lshift, _obj_0.rshift -end local spairs spairs = function(t) local keys diff --git a/etc/asma.moon b/etc/asma.moon index 94fc0d7..22b1e78 100644 --- a/etc/asma.moon +++ b/etc/asma.moon @@ -1,4 +1,22 @@ -import band, bor, lshift, rshift from require 'bit' +-- +-- Asma tree helper script +-- +-- This script updates the trees at the end of projects/software/asma.usm when +-- Uxn's opcode set changes or new runes (first character of tokens) are +-- created, so that new changes in the C assembler can be incorporated rapidly +-- into asma. +-- +-- To run, you need Lua or LuaJIT, and just run etc/asma.lua from the top +-- directory of Uxn's git repository: +-- +-- lua etc/asma.lua +-- +-- This file is written in MoonScript, which is a language that compiles to +-- Lua, the same way as e.g. CoffeeScript compiles to JavaScript. Since +-- installing MoonScript has more dependencies than Lua, the compiled +-- etc/asma.lua is kept in Uxn's repository and will be kept updated as this +-- file changes. +-- spairs = (t) -> keys = [ k for k in pairs t ]