mirror of
https://github.com/irmen/prog8.git
synced 2024-11-18 19:12:44 +00:00
+/- #23 add test file and screenshot; fix: remove if/else as "Folding in code 2", just keywords
This commit is contained in:
parent
b7c5b1bfc7
commit
6485bf9ad9
@ -18,15 +18,15 @@
|
||||
<Keywords name="Folders in code1, open">{ {{</Keywords>
|
||||
<Keywords name="Folders in code1, middle"></Keywords>
|
||||
<Keywords name="Folders in code1, close">} }}</Keywords>
|
||||
<Keywords name="Folders in code2, open">if</Keywords>
|
||||
<Keywords name="Folders in code2, open"></Keywords>
|
||||
<Keywords name="Folders in code2, middle"></Keywords>
|
||||
<Keywords name="Folders in code2, close">else</Keywords>
|
||||
<Keywords name="Folders in code2, close"></Keywords>
|
||||
<Keywords name="Folders in comment, open"></Keywords>
|
||||
<Keywords name="Folders in comment, middle"></Keywords>
|
||||
<Keywords name="Folders in comment, close"></Keywords>
|
||||
<Keywords name="Keywords1">void const
str
byte ubyte
word uword
float
zp</Keywords>
|
||||
<Keywords name="Keywords2">%address
%asm
%asmbinary
%asminclude
%breakpoint
%import
%launcher
%option
%output
%target
%zeropage
%zpreserved</Keywords>
|
||||
<Keywords name="Keywords3">inline sub asmsub romsub
clobbers
asm
when if else
if_cc if_cs if_eq if_mi if_neg if_nz if_pl if_pos if_vc if_vs if_z
for in step do while repeat
break return goto</Keywords>
|
||||
<Keywords name="Keywords3">inline sub asmsub romsub
clobbers
asm
if
when else
if_cc if_cs if_eq if_mi if_neg if_nz if_pl if_pos if_vc if_vs if_z
for in step do while repeat
break return goto</Keywords>
|
||||
<Keywords name="Keywords4">abs acos all any asin atan avg callfar callrom ceil cmp cos cos16 cos16u cos8 cos8u deg floor len ln log2 lsb lsl lsr max memory min mkword msb peek peekw poke pokew rad reverse rnd rndf rndw rol rol2 ror ror2 round sgn sin sin16 sin16u sin8 sin8u sizeof sort sqrt sqrt16 sum swap tan
</Keywords>
|
||||
<Keywords name="Keywords5">true false
not and or xor
as to downto</Keywords>
|
||||
<Keywords name="Keywords6"></Keywords>
|
||||
|
BIN
syntax-files/NotepadPlusPlus/screenshot.png
Normal file
BIN
syntax-files/NotepadPlusPlus/screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 49 KiB |
54
syntax-files/NotepadPlusPlus/syntax-test.p8
Normal file
54
syntax-files/NotepadPlusPlus/syntax-test.p8
Normal file
@ -0,0 +1,54 @@
|
||||
%target cx16
|
||||
%import textio
|
||||
%zeropage basicsafe
|
||||
%option no_sysinit
|
||||
; simple line comment; consecutive lines can be folded
|
||||
; TODO: something
|
||||
; FIXME #31
|
||||
main {
|
||||
str input = "string literal"
|
||||
ubyte c = 'x' ; character literal in bold
|
||||
ubyte decimal = 0 + 1 - 2 * 3
|
||||
float pi = 3.1415
|
||||
ubyte boolean = true or false and true xor not false
|
||||
str temp = "?"
|
||||
word[] numbers = [$80ea, %0101011, 23]
|
||||
inline asmsub foo(ubyte char @A) clobbers(Y) {
|
||||
asm {{
|
||||
a_label:
|
||||
nop
|
||||
bcc _done
|
||||
sec
|
||||
_done: rts
|
||||
}}
|
||||
}
|
||||
inline sub start(ubyte char @A) -> void {
|
||||
ubyte @zp ch = min(max, n, (x, 5))
|
||||
if (true) {
|
||||
goto nirvana
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
repeat {
|
||||
ch = input[index+5]
|
||||
when ch {
|
||||
0 -> {
|
||||
break
|
||||
}
|
||||
else -> {
|
||||
temp[0] = ch
|
||||
txt.print(temp) ; wrongly optimized to
|
||||
; lda #$3f
|
||||
; jsr txt.chrout
|
||||
|
||||
; with -noopt the above line is correctly turned into
|
||||
; ldy #>temp
|
||||
; ldy #<temp
|
||||
; jsr txt.print
|
||||
}
|
||||
}
|
||||
index++
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user