diff --git a/syntax-files/NotepadPlusPlus/Prog8.xml b/syntax-files/NotepadPlusPlus/Prog8.xml new file mode 100644 index 000000000..798d6cbb2 --- /dev/null +++ b/syntax-files/NotepadPlusPlus/Prog8.xml @@ -0,0 +1,64 @@ + + + + + + + + 00; 01 02 03 04 + % + $ + A B C D E F a b c d e f + + + + + @ & | ^ ~ >> << += -= *= = **= &= |= ^= <<= >>= -> = == != < > <= >= , + ++ - -- * ** / ( ) [ ] + + { {{ + + } }} + + + + + + + void const str byte ubyte word uword float zp + %address %asm %asmbinary %asminclude %breakpoint %import %launcher %option %output %target %zeropage %zpreserved + 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 + 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 + true false not and or xor as to downto + + + + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/syntax-files/NotepadPlusPlus/README.md b/syntax-files/NotepadPlusPlus/README.md new file mode 100644 index 000000000..3d61cca11 --- /dev/null +++ b/syntax-files/NotepadPlusPlus/README.md @@ -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` \ No newline at end of file diff --git a/syntax-files/NotepadPlusPlus/readme.txt b/syntax-files/NotepadPlusPlus/readme.txt deleted file mode 100644 index 1333ed77b..000000000 --- a/syntax-files/NotepadPlusPlus/readme.txt +++ /dev/null @@ -1 +0,0 @@ -TODO diff --git a/syntax-files/NotepadPlusPlus/screenshot.png b/syntax-files/NotepadPlusPlus/screenshot.png new file mode 100644 index 000000000..58444063f Binary files /dev/null and b/syntax-files/NotepadPlusPlus/screenshot.png differ diff --git a/syntax-files/NotepadPlusPlus/syntax-test.p8 b/syntax-files/NotepadPlusPlus/syntax-test.p8 new file mode 100644 index 000000000..b9d6b3f3e --- /dev/null +++ b/syntax-files/NotepadPlusPlus/syntax-test.p8 @@ -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 #