@@ 9,10 9,18 @@
@token $30 &last $30 &last2 $30
@stats &lines $2 &tokens $2
@mute $1
- @staticseq $1
-|0100 ( -> ) ;await-src .Console/vector DEO2 ;dict/input ;pstr JSR2 BRK
-@await-src ( -> ) .Console/read DEI .src ;skey JSR2 ,on-ready JCN BRK
+|0100 ( -> )
+
+ ;await-src .Console/vector DEO2 ;dict/input ;pstr JSR2
+
+BRK
+
+@await-src ( -> )
+
+ .Console/read DEI .src ;skey JSR2 ,on-ready JCN
+
+BRK
@on-ready ( -> )
@@ 98,29 106,18 @@ JMP2r
( static arithmetic sequence )
- ;token ;is-arithmetic JSR2 .staticseq LDZ #0101 NEQ2 ,&no-seq JCN
+ ;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
;static ;warn JSR2
- &no-seq
- ( 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
+ &no-ari
( literal duplicates )
- ;token ;token/last ;scmp-wild JSR2 #00 EQU ,&no-litseq JCN
- ;token ;is-litshort JSR2 #00 EQU ,&no-litseq JCN
+ ;token ;token/last ;scmp JSR2 #00 EQU ,&no-lit JCN
+ ;token ;is-static JSR2 #00 EQU ,&no-lit JCN
;static-dup ;warn JSR2
- &no-litseq
+ &no-lit
&cleanup
;token/last ;token/last2 ;scpy JSR2
@@ 188,6 185,16 @@ JMP2r
JMP2r
+@is-static ( token* -- flag )
+
+ LDAk LIT "; EQU ,&pass JCN
+ LDAk LIT ". EQU ,&pass JCN
+ LDAk LIT "# EQU ,&pass JCN
+ POP2 #00
+
+JMP2r
+ &pass POP2 #01 JMP2r
+
@print-summary ( -- )
;dict/linted-txt ;pstr JSR2