]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/fsharp.yaml
Ignore tool files
[micro.git] / runtime / syntax / fsharp.yaml
1 filetype: fsharp
2
3 detect:
4     filename: "\\.fs?$"
5
6 rules:
7     - identifier: "\\b[A-Z][0-9a-z_]{2,}\\b"
8       #declarations
9     - statement: "\\b(let|val|method|in|and|rec|private|virtual|constraint)\\b"
10       #structure items
11     - type: "\\b(type|open|class|module|exception|external)\\b"
12       #patterns
13     - statement: "\\b(fun|function|functor|match|try|with)\\b"
14       #patterns-modifiers
15     - statement: "\\b(as|when|of)\\b" 
16       #conditions
17     - statement: "\\b(if|then|else)\\b"
18       #blocs
19     - type: "\\b(begin|end|object|struct|sig|for|while|do|done|to|downto)\\b"
20       #constantes
21     - constant.bool: "\\b(true|false)\\b"
22       #modules/classes
23     - special: "\\b(include|inherit|initializer)\\b"
24       #expr modifiers
25     - special: "\\b(new|ref|mutable|lazy|assert|raise)\\b"
26       #keywords which don't exist in ocaml
27     - type: "\\b(base|delegate|downcast|extern|finally|fixed|global|inline|interface|internal|let!|member|namespace|null|override|private|public)\\b"
28     - type: "\\b(return|return!|select|static|upcast|use|use!|void|yield|yield!)\\b"
29     - constant.string:
30         start: "'"
31         end: "'"
32         skip: "\\\\."
33         rules:
34             - constant.specialChar: "%."
35             - constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
36             - constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
37     - constant.string:
38         start: "\""
39         end: "\""
40         skip: "\\\\."
41         rules:
42             - constant.specialChar: "%."
43             - constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
44             - constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
45     - comment:
46         start: "\\(\\*"
47         end: "\\*\\)"
48         rules: []