mirror of
https://github.com/irmen/prog8.git
synced 2024-11-23 07:32:10 +00:00
Merge pull request #32 from meisl/master
syntax file for Notepad++ thanks for your contribution!!
This commit is contained in:
commit
4d097d2139
64
syntax-files/NotepadPlusPlus/Prog8.xml
Normal file
64
syntax-files/NotepadPlusPlus/Prog8.xml
Normal file
@ -0,0 +1,64 @@
|
||||
<NotepadPlus>
|
||||
<UserLang name="prog8" ext="p8 prog8" udlVersion="2.1">
|
||||
<Settings>
|
||||
<Global caseIgnored="no" allowFoldOfComments="yes" foldCompact="yes" forcePureLC="0" decimalSeparator="0" />
|
||||
<Prefix Keywords1="no" Keywords2="yes" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
|
||||
</Settings>
|
||||
<KeywordLists>
|
||||
<Keywords name="Comments">00; 01 02 03 04</Keywords>
|
||||
<Keywords name="Numbers, prefix1">%</Keywords>
|
||||
<Keywords name="Numbers, prefix2">$</Keywords>
|
||||
<Keywords name="Numbers, extras1">A B C D E F a b c d e f</Keywords>
|
||||
<Keywords name="Numbers, extras2"></Keywords>
|
||||
<Keywords name="Numbers, suffix1"></Keywords>
|
||||
<Keywords name="Numbers, suffix2"></Keywords>
|
||||
<Keywords name="Numbers, range"></Keywords>
|
||||
<Keywords name="Operators1">@ & | ^ ~ >> << += -= *= = **= &= |= ^= <<= >>= -> = == != < > <= >= , + ++ - -- * ** / ( ) [ ]</Keywords>
|
||||
<Keywords name="Operators2"></Keywords>
|
||||
<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"></Keywords>
|
||||
<Keywords name="Folders in code2, middle"></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
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>
|
||||
<Keywords name="Keywords7"></Keywords>
|
||||
<Keywords name="Keywords8"></Keywords>
|
||||
<Keywords name="Delimiters">00TODO 00FIXME 01 02((EOL)) 02((EOL)) 02((EOL)) 03" 04\ 05" 06 07 08 09' 10\ 11' 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
|
||||
</KeywordLists>
|
||||
<Styles>
|
||||
<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="COMMENTS" fgColor="0080FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="LINE COMMENTS" fgColor="008040" bgColor="C1FFC1" fontName="" fontStyle="2" nesting="1" />
|
||||
<WordsStyle name="NUMBERS" fgColor="800080" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS1" fgColor="FF8000" bgColor="FFFFFF" fontName="" fontStyle="3" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS2" fgColor="8080FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS3" fgColor="0000FF" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS4" fgColor="804040" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS5" fgColor="400080" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="OPERATORS" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS1" fgColor="FF0000" bgColor="C1FFC1" fontName="" fontStyle="3" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS2" fgColor="800040" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS3" fgColor="808080" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS4" fgColor="800040" bgColor="FFFFFF" fontName="" fontStyle="1" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
|
||||
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontName="" fontStyle="0" nesting="0" />
|
||||
</Styles>
|
||||
</UserLang>
|
||||
</NotepadPlus>
|
7
syntax-files/NotepadPlusPlus/README.md
Normal file
7
syntax-files/NotepadPlusPlus/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
Prog8 syntax highlighting file for [Notepad++](https://notepad-plus-plus.org/).
|
||||
|
||||
To install:
|
||||
|
||||
* Open Notepad++
|
||||
* Menu `Language` | `User Defined Language` | `Define your language...`
|
||||
* Click `Import...`, then choose the xml file `Prog8.xml`
|
@ -1 +0,0 @@
|
||||
TODO
|
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