| 1 |
<!DOCTYPE html> |
| 2 |
<html><head> |
| 3 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
| 4 |
<title>highlight_lpc.c</title> |
| 5 |
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (LPC) - Theme (Breeze Dark)"/> |
| 6 |
</head><body style="background-color:#232629;color:#cfcfc2"><pre> |
| 7 |
<span style="color:#7a7c7d;">// </span><span style="color:#81ca2d;background-color:#4d1f24;font-weight:bold;">NOTE</span><span style="color:#7a7c7d;">: This is a test file for kate's LPC syntax highlighting.</span> |
| 8 |
|
| 9 |
<span style="color:#7a7c7d;">// This is a Single-Line Comment</span> |
| 10 |
<span style="color:#7a7c7d;">/* This is a Multi-</span> |
| 11 |
<span style="color:#7a7c7d;"> Line Comment */</span> |
| 12 |
|
| 13 |
<span style="color:#7a7c7d;">// This again is a Single-Line Comment which should end here /*</span> |
| 14 |
|
| 15 |
<span style="color:#7a7c7d;">// And this is an evil single line comment \</span> |
| 16 |
<span style="color:#7a7c7d;"> which should include this and the next line because of the \</span> |
| 17 |
<span style="color:#7a7c7d;"> Do not use this style at home, kids.</span> |
| 18 |
<span style="color:#2980b9;background-color:#153042;">// BEGIN region marker</span> |
| 19 |
|
| 20 |
<span style="color:#2980b9;background-color:#153042;">// END of region marker</span> |
| 21 |
|
| 22 |
<span style="color:#2980b9;">private</span> <span style="color:#2980b9;">void</span> create() |
| 23 |
{ |
| 24 |
<span style="color:#7a7c7d;">// Some Preprocessor stuff:</span> |
| 25 |
<span style="color:#27ae60;">#define SOME_STUFF </span><span style="font-weight:bold;">if</span><span style="color:#27ae60;">(foo(</span><span style="color:#f44f4f;">"bar"</span><span style="color:#27ae60;">)) \</span> |
| 26 |
<span style="color:#27ae60;"> { \</span> |
| 27 |
<span style="color:#27ae60;"> bar(</span><span style="color:#f44f4f;">"foo"</span><span style="color:#27ae60;">); \</span> |
| 28 |
<span style="color:#27ae60;"> } </span><span style="color:#7a7c7d;">// Preprocessor, Keyword, Preprocessor-String, Multiline</span> |
| 29 |
|
| 30 |
<span style="color:#7a7c7d;">// Some closures:</span> |
| 31 |
<span style="color:#27ae60;">#'create</span>; |
| 32 |
<span style="color:#27ae60;">#'?!</span>; |
| 33 |
|
| 34 |
|
| 35 |
<span style="color:#7a7c7d;">/* Some other Data Types: */</span> |
| 36 |
|
| 37 |
<span style="color:#2980b9;">int</span> i = <span style="color:#f67400;">1</span>; <span style="color:#7a7c7d;">// Integer.</span> |
| 38 |
<span style="color:#2980b9;">float</span> b = <span style="color:#f67400;">2.34</span>; <span style="color:#7a7c7d;">// Float.</span> |
| 39 |
<span style="color:#2980b9;">int</span> c = <span style="color:#f67400;">0b001</span>; <span style="color:#7a7c7d;">// Binary</span> |
| 40 |
<span style="color:#2980b9;">int</span> e = <span style="color:#f67400;">0x019Beef</span>; <span style="color:#7a7c7d;">// Hexadecimal</span> |
| 41 |
<span style="color:#2980b9;">int</span> f = <span style="color:#f67400;">0o2345</span>; <span style="color:#7a7c7d;">// Octal</span> |
| 42 |
<span style="color:#2980b9;">string</span> a = <span style="color:#f44f4f;">"Wheee"</span>; <span style="color:#7a7c7d;">// String</span> |
| 43 |
<span style="color:#2980b9;">string</span> x = <span style="color:#f44f4f;">"Wheee</span>\ |
| 44 |
<span style="color:#f44f4f;"> heee"</span>; <span style="color:#7a7c7d;">// Multi-Line String, again, don't use this.</span> |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
<span style="color:#7a7c7d;">/* Some keywords: */</span> |
| 49 |
<span style="font-weight:bold;">if</span>(<span style="color:#f67400;">1</span>) |
| 50 |
{ |
| 51 |
<span style="font-weight:bold;">switch</span>(<span style="color:#f67400;">2</span>) |
| 52 |
{ |
| 53 |
<span style="font-weight:bold;">case</span> <span style="color:#f67400;">3</span>: |
| 54 |
<span style="color:#f67400;">4</span>; |
| 55 |
<span style="font-weight:bold;">break</span>; |
| 56 |
} |
| 57 |
} |
| 58 |
|
| 59 |
<span style="font-weight:bold;">else</span> |
| 60 |
{ |
| 61 |
<span style="font-weight:bold;">return</span> <span style="color:#f67400;">0</span>; |
| 62 |
} |
| 63 |
} |
| 64 |
|
| 65 |
<span style="color:#7a7c7d;">/*</span> |
| 66 |
<span style="color:#ca9219;background-color:#451e1a;font-weight:bold;">WARNING</span><span style="color:#7a7c7d;">: If the above function is part of a multi-line comment,</span> |
| 67 |
<span style="color:#7a7c7d;"> it's buggy. The </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold;">WARNING</span><span style="color:#7a7c7d;">: itself should be a comment-keyword.</span> |
| 68 |
<span style="color:#7a7c7d;"> That's not actually part of the language, but simply used</span> |
| 69 |
<span style="color:#7a7c7d;"> to highlight important stuff inside comments like </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold;">TODO</span><span style="color:#7a7c7d;">: etc.</span> |
| 70 |
<span style="color:#7a7c7d;">*/</span> |
| 71 |
</pre></body></html> |