~rabbits/uxnfor

e2c6e9aa416a978efce5745d969f4eed3f967f43 — Devine Lu Linvega 2 months ago c2ddd96
Returned line comments
2 files changed, 10 insertions(+), 4 deletions(-)

M etc/test.tal
M src/uxnfor.tal
M etc/test.tal => etc/test.tal +8 -4
@@ 34,9 34,12 @@
	( dez ) #1234 #1234 #1234 JMP2r

@padded ( -- )
	( | foo ) #1234
	( | bar ) #1234 #1234
	( | line 1 | line 2 | line 3 ) #1234 #1234 #1234 JMP2r
	( | foo )
	#1234
	( | bar )
	#1234 #1234
	( | line 1 | line 2 | line 3 )
	#1234 #1234 #1234 JMP2r

@eol-cond ( len* -- and )
	DUP2 #0002 EQU2 ?&byte


@@ 58,7 61,8 @@
		long body <send>
		#1234 <send>
		#5678 <send> }
	( | nesting ) { foo { bar }
	( | nesting )
	{ foo { bar }
		dez }
	foo { bar }
	dez

M src/uxnfor.tal => src/uxnfor.tal +2 -0
@@ 308,6 308,7 @@
	&end INC2 POP2r JMP2r

@<emit-comment> ( str* -- str* )
	INC2k INC2 LDA [ LIT "| ] NEQ ,&break-after STR
	INC2k INC2 LDA2 [ LIT2 "@| ] NEQ2 ?{
		#0a <emit>
		LDAk <emit>


@@ 319,6 320,7 @@
		INC2 LDAk #29 NEQ ?&>w
	LDAk <emit>
	&end ( str* -- str* )
	[ LIT &break-after $1 ] ?{ <emit-break-tab> }
	INC2 JMP2r

@<emit-break-once> ( -: )