@@ -0,0 +1,196 @@
1+;; ----------------------------------------------------------------------------
2+;; Literals and comments
3+
4+[
5+ (line_comment)
6+ (block_comment)
7+ (block_comment_content)
8+] @comment
9+
10+
11+;; ----------------------------------------------------------------------------
12+;; Punctuation
13+
14+[
15+ "("
16+ ")"
17+ "{"
18+ "}"
19+ "["
20+ "]"
21+ "[|"
22+ "|]"
23+ "[<"
24+ ">]"
25+] @punctuation.bracket
26+
27+[
28+ ","
29+ ";"
30+] @punctuation.delimiter
31+
32+[
33+ "|"
34+ "="
35+ ">"
36+ "<"
37+ "-"
38+ "~"
39+ (infix_op)
40+ (prefix_op)
41+ (symbolic_op)
42+] @operator
43+
44+
45+
46+(attribute) @attribute
47+
48+[
49+ "if"
50+ "then"
51+ "else"
52+ "elif"
53+ "when"
54+ "match"
55+ "match!"
56+ "and"
57+ "or"
58+ "&&"
59+ "||"
60+ "then"
61+] @keyword.control.conditional
62+
63+[
64+ "return"
65+ "return!"
66+] @keyword.control.return
67+
68+[
69+ "for"
70+ "while"
71+] @keyword.control.return
72+
73+
74+[
75+ "open"
76+ "#r"
77+ "#load"
78+] @keyword.control.import
79+
80+[
81+ "abstract"
82+ "delegate"
83+ "static"
84+ "inline"
85+ "internal"
86+ "mutable"
87+ "override"
88+ "private"
89+ "public"
90+ "rec"
91+] @keyword.storage.modifier
92+
93+[
94+ "enum"
95+ "let"
96+ "let!"
97+ "member"
98+ "module"
99+ "namespace"
100+ "type"
101+] @keyword.storage
102+
103+[
104+ "as"
105+ "assert"
106+ "begin"
107+ "default"
108+ "do"
109+ "do!"
110+ "done"
111+ "downcast"
112+ "downto"
113+ "end"
114+ "event"
115+ "field"
116+ "finally"
117+ "fun"
118+ "function"
119+ "get"
120+ "global"
121+ "inherit"
122+ "interface"
123+ "lazy"
124+ "new"
125+ "not"
126+ "null"
127+ "of"
128+ "param"
129+ "property"
130+ "set"
131+ "struct"
132+ "try"
133+ "upcast"
134+ "use"
135+ "use!"
136+ "val"
137+ "with"
138+ "yield"
139+ "yield!"
140+] @keyword
141+
142+[
143+ "true"
144+ "false"
145+ "unit"
146+ ] @constant.builtin
147+
148+[
149+ (type)
150+ (const)
151+] @constant
152+
153+[
154+ (union_type_case)
155+ (rules (rule (identifier_pattern)))
156+] @type.enum
157+
158+(fsi_directive_decl (string) @namespace)
159+
160+[
161+ (import_decl (long_identifier))
162+ (named_module (long_identifier))
163+ (namespace (long_identifier))
164+ (named_module
165+ name: (long_identifier) )
166+ (namespace
167+ name: (long_identifier) )
168+] @namespace
169+
170+
171+(dot_expression
172+ base: (long_identifier_or_op) @variable.other.member
173+ field: (long_identifier_or_op) @function)
174+
175+[
176+ ;;(value_declaration_left (identifier_pattern) )
177+ (function_declaration_left (identifier) )
178+ (call_expression (long_identifier_or_op (long_identifier)))
179+ ;;(application_expression (long_identifier_or_op (long_identifier)))
180+] @function
181+
182+[
183+ (string)
184+ (triple_quoted_string)
185+] @string
186+
187+[
188+ (int)
189+ (int16)
190+ (int32)
191+ (int64)
192+ (float)
193+ (decimal)
194+] @constant.numeric
195+
196+