]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/fortran.yaml
Merge branch 'python-highlight-zero' of https://github.com/a11ce/micro into a11ce...
[micro.git] / runtime / syntax / fortran.yaml
1 filetype: fortran
2
3 detect:
4     filename: "\\.([Ff]|[Ff]90|[Ff]95|[Ff][Oo][Rr])$"
5
6 rules:
7     - type:  "(?i)\\b(action|advance|all|allocatable|allocated|any|apostrophe)\\b"
8     - type:  "(?i)\\b(append|asis|assign|assignment|associated|character|common)\\b"
9     - type:  "(?i)\\b(complex|data|default|delim|dimension|double precision)\\b"
10     - type:  "(?i)\\b(elemental|epsilon|external|file|fmt|form|format|huge)\\b"
11     - type:  "(?i)\\b(implicit|include|index|inquire|integer|intent|interface)\\b"
12     - type:  "(?i)\\b(intrinsic|iostat|kind|logical|module|none|null|only)\\\\b"
13     - type:  "(?i)\\b(operator|optional|pack|parameter|pointer|position|private)\\b"
14     - type:  "(?i)\\b(program|public|real|recl|recursive|selected_int_kind)\\b"
15     - type:  "(?i)\\b(selected_real_kind|subroutine|status)\\b"
16
17     - constant:  "(?i)\\b(abs|achar|adjustl|adjustr|allocate|bit_size|call|char)\\b" 
18     - constant:  "(?i)\\b(close|contains|count|cpu_time|cshift|date_and_time)\\b" 
19     - constant:  "(?i)\\b(deallocate|digits|dot_product|eor|eoshift|function|iachar)\\b" 
20     - constant:  "(?i)\\b(iand|ibclr|ibits|ibset|ichar|ieor|iolength|ior|ishft|ishftc)\\b" 
21     - constant:  "(?i)\\b(lbound|len|len_trim|matmul|maxexponent|maxloc|maxval|merge)\\b" 
22     - constant:  "(?i)\\b(minexponent|minloc|minval|mvbits|namelist|nearest|nullify)\\b" 
23     - constant:  "(?i)\\b(open|pad|present|print|product|pure|quote|radix)\\b" 
24     - constant:  "(?i)\\b(random_number|random_seed|range|read|readwrite|replace)\\b" 
25     - constant:  "(?i)\\b(reshape|rewind|save|scan|sequence|shape|sign|size|spacing)\\b" 
26     - constant:  "(?i)\\b(spread|sum|system_clock|target|transfer|transpose|trim)\\b" 
27     - constant:  "(?i)\\b(ubound|unpack|verify|write|tiny|type|use|yes)\\b"
28
29     - statement: "(?i)\\b(.and.|case|do|else|else?if|else?where|end|end?do|end?if)\\b"
30     - statement: "(?i)\\b(end?select|.eqv.|forall|if|lge|lgt|lle|llt|.neqv.|.not.)\\b"
31     - statement: "(?i)\\b(.or.|repeat|select case|then|where|while)\\b"
32
33     - special: "(?i)\\b(continue|cycle|exit|go?to|result|return)\\b"
34
35       #Operator Color
36     - symbol.operator: "[.:;,+*|=!\\%]|/|-|&"
37
38       #Parenthetical Color
39     - symbol.bracket: "[(){}]|\\[|\\]"
40
41       # Add preprocessor commands.
42     - preproc: "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
43
44     - constant.string:
45         start: "\""
46         end: "\""
47         skip: "\\\\."
48         rules:
49             - constant.specialChar: "\\\\."
50
51     - constant.string:
52         start: "'"
53         end: "'"
54         skip: "\\\\."
55         rules:
56             - constant.specialChar: "\\\\."
57
58     - comment:
59         start: "!"
60         end: "$"
61         rules:
62             - todo: "(TODO|XXX|FIXME):?"
63