From 0e10c9aff6416482ecea10cd39194d49c63a6a5b Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Wed, 19 Apr 2023 00:39:24 +0200 Subject: Automate tedious events. --- tools/gencode.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tools') diff --git a/tools/gencode.js b/tools/gencode.js index ece66df..c0e1cc9 100644 --- a/tools/gencode.js +++ b/tools/gencode.js @@ -110,6 +110,13 @@ for (let line of fs.readFileSync("events.txt", "utf-8").split("\n")) { emit([ line[0], line.slice(1).join(" ") ]) break + case "count_spaces": + emit([ line[0], "(s)=>" + line.slice(1).join(" ") ]) + break + case "count_pieces": + emit([ line[0], "(p,s)=>" + line.slice(1).join(" ") ]) + break + case "asm": case "if": case "while": -- cgit v1.2.3