File: odin.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 (64 lines) | stat: -rw-r--r-- 2,313 bytes parent folder | download | duplicates (3)
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
filetype: odin

detect:
    filename: "\\.odin$"

rules:
    # Conditionals and control flow
    - special: "\\b(asm|auto_cast|break|case|cast|context|continue|do|dynamic|fallthrough|return|transmute|using|where)\\b"
    - statement: "\\b(else|for|if|switch|in|not_in|or_else|or_return|when)\\b"
    - preproc: "\\b(assert|package|foreign|import|proc|defer|make|new|free|delete|copy|len|cap|append|raw_data)\\b"
    - preproc: "\\b((size|align|offset|type|type_info|typeid)_of|offset_of_by_string)\\b"
    - preproc: "\\b(swizzle|complex|quaternion|real|imag|jmag|kmag|conj|expand_to_tuple|min|max|abs|clamp|soa_zip|soa_unzip|transpose|outer_product|hadamard_product|matrix_flatten)\\b"
    - symbol.operator: "[-+/*=<>!~%&|^@]|:\\s*=|:\\s*:|\\?"

      # Types
    - symbol: "(,|\\.)"
    - type: "\\b(b(8|16|32|64)|(i|u)(8|(16|32|64|128)(le|be)?)|f(16|32|64)(le|be)?|complex(32|64|128)|quaternion(64|128|256))\\b"
    - type: "\\b(any|bool|byte|rune|u?int|uintptr|rawptr|c?string|map|matrix|typeid)\\b"
    - type.keyword: "\\b(distinct|struct|enum|union|bit_set)\\b"
    - constant.bool: "\\b(true|false|nil)\\b"

      # Brackets
    - symbol.brackets: "(\\{|\\})"
    - symbol.brackets: "(\\(|\\))"
    - symbol.brackets: "(\\[|\\])"

      # Numbers and strings
    - constant.number: "\\b(0b[01]*|0o[0-7]*|0x[0-9a-fA-F]*|[0-9_]+|0d[0-9]*|0z[0-9abAB]*)\\b|'.'"

    - constant.string:
        start: "\""
        end: "\""
        skip: "\\\\."
        rules:
            - constant.specialChar: "%."
            - constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
            - constant.specialChar: "\\\\([0-7]{1,3}|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})"

    - constant.string:
        start: "'"
        end: "'"
        skip: "\\\\."
        rules:
            - error: "..+"
            - constant.specialChar: "%."
            - constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
            - constant.specialChar: "\\\\([0-7]{1,3}|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})"

    - constant.string:
        start: "`"
        end: "`"
        rules: []

    - comment:
        start: "//"
        end: "$"
        rules:
            - todo: "TODO:?|NOTE(\\(.*\\))?:?"

    - comment:
        start: "/\\*"
        end: "\\*/"
        rules:
            - todo: "TODO:?|NOTE(\\(.*\\))?:?"