From 35bce0158badedb16a8e1eac40261eef0b077ea3 Mon Sep 17 00:00:00 2001 From: neauoire Date: Sun, 11 Dec 2022 10:54:54 -0800 Subject: [PATCH] Fixed issue with MS line-endings --- etc/example.tal | 8 ++------ src/uxnlin.tal | 12 ++++-------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/etc/example.tal b/etc/example.tal index 5521561..2d5480b 100644 --- a/etc/example.tal +++ b/etc/example.tal @@ -72,12 +72,8 @@ DEI STH DEI2 STH2 - ( MS Line-endings ) - ( this should not throw warnings ) - SUB #0f GTH #50 SFT ( h ) - STHr ORA - #40 - ORA + ( catch as static ) + #0102 ADD BRK diff --git a/src/uxnlin.tal b/src/uxnlin.tal index ff89933..529d869 100644 --- a/src/uxnlin.tal +++ b/src/uxnlin.tal @@ -54,8 +54,8 @@ JMP2 @walk ( char -- ) - ( msline ) DUP #0d EQU #1b MUL ADD - + ( msline to space ) DUP #0d EQU #13 MUL ADD + #0a EQUk NIP ,&line JCN LIT "( EQUk NIP ,&toggle-sleep JCN LIT ") EQUk NIP ,&toggle-sleep JCN @@ -73,20 +73,19 @@ JMP2r &toggle-mute LIT "[ EQU ,parse/mute STR ;token/last ;sclr JSR2 JMP2r &line .stats/lines LDZ2k INC2 ROT STZ2 ( , ) -@parse ( char -- recipe* ) +@parse ( char -- ) ( char ) POP ( is mute ) [ LIT &mute $1 ] ;&ignore JCN2 + ( is blank ) ;token LDA #00 EQU ;&ignore JCN2 ( incr tokens ) .stats/tokens LDZ2k INC2 ROT STZ2 ( token length ) - ;token ;slen JSR2 #0019 LTH2 ,&no-clip JCN ;tokenlen ;print-warn JSR2 &no-clip ( chain include ) - ;token LDA LIT "~ NEQ ,&no-inc JCN ;src DUP2 ;sclr JSR2 @@ -126,9 +125,6 @@ JMP2r ;token ;is-arithmetic JSR2 #00 EQU ,&no-ari JCN ;token/last ;is-static JSR2 #00 EQU ,&no-ari JCN ;token/last2 ;is-static JSR2 #00 EQU ,&no-ari JCN - - ;token/last ;pstr JSR2 #2018 DEO - ;token/last2 ;pstr JSR2 #2018 DEO ;static ;print-warn2 JSR2 &no-ari