File: kotlin.yaml

package info (click to toggle)
micro 2.0.15-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,128 kB
  • sloc: sh: 265; makefile: 77; xml: 53
file content (66 lines) | stat: -rw-r--r-- 1,811 bytes parent folder | download | duplicates (2)
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
65
66
filetype: kotlin

detect:
    filename: "\\.kts?$"

rules:

    # Operators
    - symbol.operator: ([.:;,+*|=!?\\%]|<|>|/|-|&)

    # Statements Keywords
    - statement: \b(as|by|class|constructor|companion|const|fun|import|in|infix|interface|inline|is|out|operator|package|return|suspend|super|this|when|val|var)\b
    - statement.properties: \b(get|set)\b
    - statement.control: \b(break|continue|else|do|if|try|catch|finally|for|while)\b
    - statement.class: \b(abstract|annotation|data|enum|final|open|sealed)\b
    - statement.member: \b(override|lateinit|init)\b
    - statement.access: \b(internal|private|protected|public)\b
    - statement.parameter: \b(crossinline|noinline|reified|vararg)\b

    # Expression and types
    - type: \b(dynamic|object|throw|typealias)\b

    # Meta
    - statement.meta: \@(\bfile|delegate|field|get|property|receiver|set|setparam|param|)\b

    # Constant
    - constant: \b(true|false|null)
    - constant.number: ([0-9]+)

    # Storage Types
    - type.storage: \b(Byte|UByte|Char|Double|Float|Int|UInt|Long|ULong|Short|UShort|Boolean|Unit|Nothing)\b

    # Collections
    - type.collections: \b(Array)\b

     # String
    - constant.string:
        start: \"
        end: \"
        skip: \\.
        rules:
            - constant.specialChar: (\\0|\\\\|\\t|\\n|\\r|\\"|\\')
            - constant.unicode: \\u\{[[:xdigit:]]+}

    # Shebang Line
    - comment.shebang: ^(#!).*

    # Line Comment
    - comment.line: "//.*"

    # Block Comment
    - comment.block:
        start: "/\\*"
        end: "\\*/"
        rules:
            - todo: "(TODO|XXX|FIXME):?"

    # Doc Block Comment
    - comment.block:
        start: "/\\*\\*"
        end: "\\*/"
        rules:
            - todo: "(TODO|XXX|FIXME):?"

    # Todo
    - todo: "(TODO|XXX|FIXME):?"