File: highlight_lpc.c

package info (click to toggle)
libsyntax-highlight-engine-kate-perl 0.10%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 3,844 kB
  • ctags: 2,233
  • sloc: perl: 84,056; ruby: 176; asm: 166; sh: 162; cpp: 144; jsp: 128; haskell: 116; f90: 99; python: 98; ml: 75; xml: 43; yacc: 37; ansic: 32; tcl: 29; lisp: 24; makefile: 14; awk: 13; php: 5
file content (64 lines) | stat: -rw-r--r-- 1,513 bytes parent folder | download | duplicates (24)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// NOTE: This is a test file for kate's LPC syntax highlighting.

// This is a Single-Line Comment
/* This is a Multi-
                   Line Comment */

// This again is a Single-Line Comment which should end here /*

// And this is an evil single line comment \
   which should include this and the next line because of the \
   Do not use this style at home, kids.
// BEGIN region marker

// END of region marker

private void create()
{
// Some Preprocessor stuff:
#define SOME_STUFF if(foo("bar")) \
                   { \
                       bar("foo"); \
                   } // Preprocessor, Keyword, Preprocessor-String, Multiline

    // Some closures:
    #'create;
    #'?!;


    /* Some other Data Types: */

    int i = 1;            // Integer.
    float b = 2.34;       // Float.
    int c = 0b001;        // Binary
    int e = 0x019Beef;    // Hexadecimal
    int f = 0o2345;       // Octal
    string a = "Wheee";   // String
    string x = "Wheee\
     heee";               // Multi-Line String, again, don't use this.



    /* Some keywords: */
    if(1)
    {
        switch(2)
        {
            case 3:
                4;
                break;
        }
    }

    else
    {
        return 0;
    }
}

/*
WARNING: If the above function is part of a multi-line comment,
         it's buggy. The WARNING: itself should be a comment-keyword.
         That's not actually part of the language, but simply used
         to highlight important stuff inside comments like TODO: etc.
*/