~rabbits/uxnlin

620d3cc8de29a47c59cd515515d47d48b51c6d92 — Devine Lu Linvega 5 months ago 35af887
Catch label duplicates
2 files changed, 15 insertions(+), 0 deletions(-)

M etc/example.tal
M src/uxnlin.tal
M etc/example.tal => etc/example.tal +4 -0
@@ 54,6 54,10 @@
	( series of 3 )
	DUP2 #0000 EQU2

	( labels )
	;label ;label
	.label .label

BRK

~etc/include.tal

M src/uxnlin.tal => src/uxnlin.tal +11 -0
@@ 104,6 104,17 @@ JMP2r
	( set arithmetic sequence )
	;token LDA ;token/last LDA LIT "# LIT "# EQU2 .staticseq STZ

	( label duplicates )

	;token LDA LIT "; NEQ ,&no-abs JCN
		;token ;token/last ;scmp JSR2 #00 EQU ,&no-abs JCN
		;static-dup ;warn JSR2
		&no-abs
	;token LDA LIT ". NEQ ,&no-rel JCN
		;token ;token/last ;scmp JSR2 #00 EQU ,&no-rel JCN
		;static-dup ;warn JSR2
		&no-rel

	( literal duplicates )

	;token ;token/last ;scmp-wild JSR2 #00 EQU ,&no-litseq JCN