From b89eba8253caccd027c861b5cfa68b29dceb6639 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 20 Mar 2023 01:15:58 +0100 Subject: Fix optional instructions. Poppies. --- tools/gencode.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'tools') diff --git a/tools/gencode.py b/tools/gencode.py index c78ce11..c02f24d 100644 --- a/tools/gencode.py +++ b/tools/gencode.py @@ -46,16 +46,10 @@ for event in range(2,146): for line in code[event]: if line.startswith('space'): line = line.split(' ', 2) - print('\t[ vm_space, ' + line[1] + ', (s)=>' + line[2] + ' ],') - elif line.startswith('each space'): - line = line.split(' ', 2) - print('\t[ vm_space, 0, (s)=>' + line[2] + ' ],') + print('\t[ vm_'+line[0]+', ' + line[1] + ', (s)=>' + line[2] + ' ],') elif line.startswith('piece'): line = line.split(' ', 2) - print('\t[ vm_piece, ' + line[1] + ', (p,s)=>' + line[2] + ' ],') - elif line.startswith('each piece'): - line = line.split(' ', 2) - print('\t[ vm_piece, 0, (p,s)=>' + line[2] + ' ],') + print('\t[ vm_'+line[0]+', ' + line[1] + ', (p,s)=>' + line[2] + ' ],') elif line.startswith('while'): line = line.split(' ', 1) print('\t[ vm_while, ()=>' + line[1] + ' ],') -- cgit v1.2.3