@@ 625,8 625,8 @@ JMP2r
@is-rune ( addr* -- bool )
- ;walk-color/c LDA ?&skip
.textarea/highlight LDZ ?&skip
+ ;scan-comment/active LDA ?&skip
INC2k LDA #21 LTH ?&skip
LDA ;runes cndx INC2 ORA
@@ 806,13 806,15 @@ JMP2r
( setup )
.selection/from LDZ2 get-current-marker
get-marker ;walk-color/scope STA2
- #00 ;walk-color/c STA
+ #00 ;scan-comment/active STA
+
( paint )
#0010 .scroll/x LDZ2 SUB2 #0080 ADD2 .Screen/x DEO2
#0020 .Screen/y DEO2
#15 .Screen/auto DEO
get-eof INC2 .scroll/addr LDZ2
&l
+ scan-comment
draw-token
.Screen/y DEI2 .Screen/height DEI2 #0010 SUB2 GTH2 ?&end
GTH2k ?&l
@@ 852,12 854,22 @@ JMP2r
JMP2r
+@scan-comment ( addr* -- addr* )
+
+ .textarea/highlight LDZ ?&skip
+ LDAk LIT "( EQU ?&true
+ DUP2 #0001 SUB2 LDA LIT ") EQU ?&false
+ &skip
+
+JMP2r
+ &true #01 ,&active STR JMP2r
+ &false #00 ,&active STR JMP2r
+ &active $1
+
@walk-color ( addr* -- addr* color )
.textarea/highlight LDZ ?&skip
- LDAk LIT ") EQU ?&comment-end
- [ LIT &c $1 ] ?&comment
- LDAk LIT "( EQU ?&comment
+ ;scan-comment/active LDA ?&comment
DUP2 [ LIT2 &scope $2 ] EQU2 ?&parent
LDAk LIT "@ EQU ?&label
LDAk LIT "& EQU ?&label
@@ 867,8 879,7 @@ JMP2r
#01
JMP2r
- &comment #01 ,&c STR #03 JMP2r
- &comment-end #00 ,&c STR #03 JMP2r
+ &comment #03 JMP2r
&parent #09 JMP2r
&label #02 JMP2r
&include #06 JMP2r