File: crystal.yaml

package info (click to toggle)
micro 2.0.15-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 2,828 kB
  • sloc: sh: 247; makefile: 77; xml: 53
file content (72 lines) | stat: -rw-r--r-- 2,136 bytes parent folder | download | duplicates (5)
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
67
68
69
70
71
72
filetype: crystal

detect:
    filename: "\\.cr$"

rules:
    # Asciibetical list of reserved words
    - statement: "\\b(abstract|alias|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|in|include|instance_sizeof|lib|loop|macro|module|next|of|out|pointerof|private|protected|raise|require|rescue|return|select|self|sizeof|spawn|struct|super|then|type|typeof|uninitialized|union|unless|until|verbatim|when|while|with|yield)\\b"
      # Constants
    - constant: "\\b(true|false|nil)\\b"
    - constant.number: "\\b[0-9]+\\b"
      # Ones that can't be in the same regex because they include non-words.
      # The nil? one has to be after the constants.
    - statement: "\\b(nil\\?|as(\\?|\\b)|is_a\\?|responds_to\\?)"
    - type: "(\\$|@|@@)?\\b[A-Z]+[0-9A-Z_a-z]*"
      # Crystal "symbols"
    - constant:  "([ 	]|^):[0-9A-Z_]+\\b"
      # Some unique things we want to stand out
    - constant: "\\b(__FILE__|__LINE__)\\b"
      # Regular expressions
    - constant: "/([^/]|(\\\\/))*/[iomx]*|%r\\{([^}]|(\\\\}))*\\}[iomx]*"

      # Shell command expansion is in `backticks` or like %x{this}.  These are
      # "double-quotish" (to use a perlism).
    - constant.string: "`[^`]*`|%x\\{[^}]*\\}"

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

    - constant.string:
        start: "%x\\{"
        end: "\\}"
        rules: []

    - constant.string:
        start: "\""
        end: "\""
        skip: "\\\\."
        rules:
            - constant.specialChar: "\\\\."
            - symbol.brackets:
                start: "#\\{"
                end: "\\}"
                rules:
                    - default: ".*"

    - constant.string:
        start: "'"
        end: "'"
        skip: "\\\\."
        rules:
            - constant.specialChar: "\\\\."

    - comment:
        start: "#"
        end: "$"
        rules:
            - todo: "(TODO|XXX|FIXME):?"

    - comment.bright:
        start: "##"
        end: "$"
        rules:
            - todo: "(TODO|XXX|FIXME):?"

    - constant:
        start: "<<-?'?EOT'?"
        end: "^EOT"
        rules: []