]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/ada.yaml
Ignore tool files
[micro.git] / runtime / syntax / ada.yaml
1 filetype: ada
2
3 detect:
4     filename: "(\\.ads$|\\.adb$|\\.ada$)"
5
6 rules:   
7     # Operators
8     - symbol.operator: ([.:;,+*|=!?\\%]|<|>|/|-|&)
9     - symbol.brackets: "[(){}]|\\[|\\]"
10     # keyword.reserved
11     - statement.reserved: \b(abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case)\b
12     - statement.reserved: \b(constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function)\b
13     - statement.reserved: \b(generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|or|others|out|overriding)\b
14     - statement.reserved: \b(package|pragma|private|procedure|protected|raise|range|record|rem|renames|return|requeue)\b
15     - statement.reserved: \b(reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until)\b
16     - statement.reserved: \b(use|when|while|with|xor)\b
17
18     # Constant
19     - constant.bool: \b(TRUE|FALSE)
20     - constant.number: ([0-9]+)
21     
22     # Storage Types
23     - type.storage: \b(INTEGER|NATURAL|POSITIVE|FLOAT|CHARACTER|STRING)\b
24     - type.storage: \b(LONG_INTEGER|SHORT_INTEGER|LONG_FLOAT|SHORT_FLOAT)\b
25     
26     #Character
27     - constant.string.char: \'.\'
28
29     # String
30     - constant.string:
31         start: \"
32         end: \"
33         skip: \\.
34         rules:
35             - constant.specialChar: (\\0|\\\\|\\t|\\n|\\r|\\"|\\')
36             - constant.interpolation: \\\([[:graph:]]*\)
37             - constant.unicode: \\u\{[[:xdigit:]]+}
38
39     
40     # Line Comment
41     - comment.line: "--.*"
42     
43     # Todo
44     - todo: "(TODO|XXX|FIXME):?"