~rabbits/potato

a2078a72023c47f1f27f13b6bdd1e093af09ab32 — Devine Lu Linvega 1 year, 6 months ago 0d4a75f
Display potato modal for assembly errors
2 files changed, 39 insertions(+), 4 deletions(-)

A etc/error.tal
M src/assembler.tal
A etc/error.tal => etc/error.tal +35 -0
@@ 0,0 1,35 @@
|0020 "zero-page-writing $1

|0100 

	( invalid paddings )
	|abspad
	$relpad
	( invalid hex )
	#vo
	#void
	( invalid token )
	bad-token
	( invalid literals )
	#a 
	#aaa 
	#aaaaa
	( invalid raws )
	b
	bbb
	bbbbb
	( duplicate labels )
	@unique-parent
	@unique-parent
		&unique-children
		&unique-children
	( invalid labels )
	.zeropage
	,missing
	;absolute
	( invalid distance )
	,too-far

BRK

$1000 @too-far

M src/assembler.tal => src/assembler.tal +4 -4
@@ 1,11 1,11 @@

@on-error ( id* name* -> )

	#0a18 DEO
	( print ) ;err pstr pstr #2018 DEO pstr ;dict/asm-in pstr ;scope pstr ;dict/asm-dot pstr
	( halt ) #010f DEO
	!add-err
	POP2 POP2
	POP2r

BRK
JMP2r

@handle-file ( f* -- )