diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-04-19 00:39:24 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-05-03 18:48:16 +0200 |
commit | 0e10c9aff6416482ecea10cd39194d49c63a6a5b (patch) | |
tree | 577eaae990a8ecd45d6884dd4f798b84acbe045d /tools | |
parent | 2ba9940a3c7ce78cb8266eca557a7c8664cae4d8 (diff) | |
download | andean-abyss-0e10c9aff6416482ecea10cd39194d49c63a6a5b.tar.gz |
Automate tedious events.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gencode.js | 7 |
1 files changed, 7 insertions, 0 deletions
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": |