@@ -9,63 +9,230 @@ file_extensions:
9scope: source.fsharp
9scope: source.fsharp
12+ - include: compiler_directives
12 - include: comments
13 - include: comments
13 - include: constants
14 - include: constants
15− - include: attributes
16 - include: strings
15 - include: strings
17+ - include: double_tick
17 - include: definition
18 - include: definition
18− - include: method_calls
19+ - include: abstract_definition
20+ - include: attributes
19 - include: modules
21 - include: modules
20 - include: anonymous_functions
22 - include: anonymous_functions
23+ - include: du_declaration
24+ - include: record_declaration
26+ - include: strp_inlined
21 - include: keywords
27 - include: keywords
31+ - match: '\b(abstract)\s+(member)?(\s+\[\<.*\>\])?\s*([_[:alpha:]0-9,\._`\s]+)(:)'
35+ 3: support.function.attribute.fsharp
38+ - meta_scope: abstract.definition.fsharp
39+ - match: \s*(with)\b|=|$
44+ - include: common_declaration
45+ - match: '(\?{0,1})([[:alpha:]0-9''`^._ ]+)\s*(:)(\s*([[:alpha:]0-9''`^._ ]+)){0,1}'
47+ 1: keyword.symbol.fsharp
48+ 2: variable.parameter.fsharp
49+ 3: keyword.symbol.fsharp
50+ 4: entity.name.type.fsharp
51+ - match: '(?!with|get|set\b)\b([\w0-9''`^._]+)'
53+ 1: entity.name.type.fsharp
22 anonymous_functions:
55 anonymous_functions:
23 - match: \b(fun)\b
56 - match: \b(fun)\b
25− 1: keyword.other.function-definition.fsharp
58+ 1: keyword.fsharp
27− - meta_scope: meta.function.anonymous
60+ - meta_scope: function.anonymous
28 - match: (->)
61 - match: (->)
30− 1: keyword.other.fsharp
63+ 1: keyword.fsharp
68+ 1: keyword.symbol.fsharp
72+ 1: keyword.symbol.fsharp
74+ - include: member_declaration
32 - include: variables
75 - include: variables
33 attributes:
76 attributes:
34 - match: '\[\<'
77 - match: '\[\<'
36 - meta_scope: support.function.attribute.fsharp
79 - meta_scope: support.function.attribute.fsharp
37− - match: '\>\]'
80+ - match: '\>\]|\]'
39 - include: main
82 - include: main
40− characters:
83+ cexprs:
41− - match: (')
84+ - match: '\b(async|seq|promise|task|maybe|asyncMaybe|controller|scope|application|pipeline)\s*\{'
43− 1: punctuation.definition.string.begin.fsharp
87+ 0: keyword.fsharp
45− - meta_scope: string.quoted.single.fsharp
92+ 1: string.quoted.single.fsharp
48− 1: punctuation.definition.string.end.fsharp
51− scope: punctuation.separator.string.ignore-eol.fsharp
52− - match: '\\([\\""ntbr]|u[a-fA-F0-9]{4}|u[a-fA-F0-9]{8})'
53− scope: constant.character.string.escape.fsharp
54− - match: '\\(?![\\''ntbr]|u[a-fA-F0-9]{4}|u[a-fA-F0-9]{8}).'
55− scope: invalid.illeagal.character.string.fsharp
57− - match: \(\*\*?(\*)\)
94+ - match: (\(\*(?!\)))
58− scope: comment.block.fsharp
60− 1: comment.block.empty.fsharp
96+ 1: comment.block.fsharp
63 - meta_scope: comment.block.fsharp
98 - meta_scope: comment.block.fsharp
64− - match: \*\)
99+ - match: (\*\))
101+ 1: comment.block.fsharp
65 pop: true
102 pop: true
67 - match: //.*$
103 - match: //.*$
68 scope: comment.line.double-slash.fsharp
104 scope: comment.line.double-slash.fsharp
105+ common_binding_definition:
107+ - include: attributes
108+ - match: (:)\s*(\()\s*(static member|member)
110+ 1: keyword.symbol.fsharp
111+ 2: keyword.symbol.fsharp
114+ - match: (\))\s*((?=,)|(?=\=))
116+ 1: keyword.symbol.fsharp
118+ - match: '(\^[[:alpha:]0-9''._]+)'
120+ 1: entity.name.type.fsharp
121+ - include: variables
125+ 1: keyword.symbol.fsharp
126+ 2: keyword.symbol.fsharp
128+ - match: '(\)\s*(([?[:alpha:]0-9''`^._ ]*)))'
130+ 1: keyword.symbol.fsharp
131+ 2: entity.name.type.fsharp
133+ - include: tuple_signature
134+ - match: '(:)\s*(\^[[:alpha:]0-9''._]+)\s*(when)'
136+ 1: keyword.symbol.fsharp
137+ 2: entity.name.type.fsharp
142+ 1: keyword.symbol.fsharp
144+ - match: \b(and|when|or)\b
145+ scope: keyword.fsharp
146+ - match: "([[:alpha:]0-9'^._]+)"
147+ comment: Because we first capture the keywords, we can capture what looks like a word and assume it's an entity definition
149+ 1: entity.name.type.fsharp
151+ scope: keyword.symbol.fsharp
152+ - match: '(:)\s*([?[:alpha:]0-9''`^._ ]+)'
154+ 1: keyword.symbol.fsharp
155+ 2: entity.name.type.fsharp
156+ - match: '(->)\s*(\()?\s*([?[:alpha:]0-9''`^._ ]+)*'
158+ 1: keyword.symbol.fsharp
159+ 2: keyword.symbol.fsharp
160+ 3: entity.name.type.fsharp
161+ - match: (\*)\s*(\()
163+ 1: keyword.symbol.fsharp
164+ 2: keyword.symbol.fsharp
166+ - match: '(\)\s*(([?[:alpha:]0-9''`^._ ]+))+)'
168+ 1: keyword.symbol.fsharp
169+ 2: entity.name.type.fsharp
171+ - include: tuple_signature
172+ - match: '(\*)(\s*([?[:alpha:]0-9''`^._ ]+))*'
174+ 1: keyword.symbol.fsharp
175+ 2: entity.name.type.fsharp
176+ - match: '(<(?![[:space:]]*\)))'
178+ 1: keyword.symbol.fsharp
182+ 1: keyword.symbol.fsharp
184+ - include: generic_declaration
187+ 1: keyword.symbol.fsharp
191+ 1: keyword.symbol.fsharp
193+ - include: record_signature
194+ - include: definition
195+ - include: variables
198+ - match: '\s*(->)\s*([[:alpha:]0-9''`^._ ]+)(<)'
200+ 1: keyword.symbol.fsharp
201+ 2: entity.name.type.fsharp
202+ 3: keyword.symbol.fsharp
206+ 1: keyword.symbol.fsharp
208+ - match: "([[:alpha:]0-9'`^._ ]+)"
210+ 1: entity.name.type.fsharp
212+ - match: '\s*(->)\s*(?!with|get|set\b)\b([\w0-9''`^._]+)'
214+ 1: keyword.symbol.fsharp
215+ 2: entity.name.type.fsharp
216+ - match: '(\?{0,1})([[:alpha:]0-9''`^._ ]+)\s*(:)(\s*([?[:alpha:]0-9''`^._ ]+)(<))'
218+ 1: keyword.symbol.fsharp
219+ 2: variable.parameter.fsharp
220+ 3: keyword.symbol.fsharp
221+ 4: keyword.symbol.fsharp
222+ 5: entity.name.type.fsharp
226+ 1: keyword.symbol.fsharp
228+ - match: "([[:alpha:]0-9'`^._ ]+)"
230+ 1: entity.name.type.fsharp
232+ compiler_directives:
233+ - match: \s?(#if|#elif|#else|#elseif|#endif|#light|#nowarn)
234+ scope: compiler_directive.fsharp
69 constants:
236 constants:
70 - match: \(\)
237 - match: \(\)
71 scope: constant.language.unit.fsharp
238 scope: constant.language.unit.fsharp
@@ -73,123 +240,349 @@ contexts:
73 scope: constant.numeric.floating-point.fsharp
240 scope: constant.numeric.floating-point.fsharp
74 - match: '\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))'
241 - match: '\b(-?((0(x|X)[0-9a-fA-F][0-9a-fA-F_]*)|(0(o|O)[0-7][0-7_]*)|(0(b|B)[01][01_]*)|([0-9][0-9_]*)))'
75 scope: constant.numeric.integer.nativeint.fsharp
242 scope: constant.numeric.integer.nativeint.fsharp
243+ - match: \b(true|false|null|unit)\b
244+ scope: constant.others.fsharp
76 definition:
245 definition:
77− - match: '\b(val|val|let|and|member|override|use)\s?(rec|inline|mutable)?(\s+\(?([a-zA-Z.\|_][a-zA-Z0-9.|_]*)\)?\w*)\b'
246+ - match: '\b(let mutable|static let mutable|let inline|let|member val|static member inline|static member|default|member|override|let!)(\s+rec|mutable)?(\s+\[\<.*\>\])?\s*(private|internal|public)?\s+(\[[^-=]*\]|[_[:alpha:]]([_[:alpha:]0-9,\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9,\._`\s]+|(?<=,)\s)*)?'
250+ 3: support.function.attribute.fsharp
254+ - meta_scope: binding.fsharp
255+ - match: \s*(with\b|=|\n+=|(?<=\=))
259+ - include: common_binding_definition
260+ - match: '\b(static val mutable|val mutable|val)(\s+rec|mutable)?(\s+\[\<.*\>\])?\s*(private|internal|public)?\s+(\[[^-=]*\]|[_[:alpha:]]([_[:alpha:]0-9,\._]+)*|``[_[:alpha:]]([_[:alpha:]0-9,\._`\s]+|(?<=,)\s)*)?'
264+ 3: support.function.attribute.fsharp
268+ - meta_scope: binding.fsharp
271+ - include: common_binding_definition
273+ - match: (``)(.*)(``)
274+ scope: variable.other.binding.fsharp
276+ 1: string.quoted.single.fsharp
277+ 2: variable.other.binding.fsharp
278+ 3: string.quoted.single.fsharp
284+ - meta_scope: du_declaration.fsharp
287+ 1: keyword.symbol.fsharp
290+ - match: '([[:alpha:]0-9''`<>^._]+|``[[:alpha:]0-9'' <>^._]+``)\s*(:)\s*([[:alpha:]0-9''`<>^._]+|``[[:alpha:]0-9'' <>^._]+``)'
292+ 1: variable.parameter.fsharp
293+ 2: keyword.symbol.fsharp
294+ 3: entity.name.type.fsharp
295+ - match: "([[:alpha:]0-9'`^._]+)|``([[:alpha:]0-9'^._ ]+)``"
297+ 1: entity.name.type.fsharp
299+ generic_declaration:
300+ - match: (:)\s*(\()\s*(static member|member)
78 captures:
301 captures:
79− 1: keyword.other.binding.fsharp
302+ 1: keyword.symbol.fsharp
80− 2: keyword.other.function-recursive.fsharp
303+ 2: keyword.symbol.fsharp
81− 3: variable.other.binding.fsharp
304+ 3: keyword.fsharp
83− - meta_scope: meta.binding.fsharp
84− - match: "=|$"
306+ - match: (\))
85 captures:
307 captures:
86− 1: punctuation.separator.function.type-constraint.fsharp
308+ 1: keyword.symbol.fsharp
87 pop: true
309 pop: true
312+ 1: keyword.symbol.fsharp
316+ 1: keyword.symbol.fsharp
318+ - include: member_declaration
319+ - match: '((''|\^)[[:alpha:]0-9''._]+)'
321+ 1: entity.name.type.fsharp
88 - include: variables
322 - include: variables
89− - match: \b(let)\s+((\(\))|(_))\s+=
323+ - include: keywords
90− scope: meta.expression.fsharp
324+ - match: \b(private|to|public|internal|function|yield!|yield|class|exception|match|delegate|of|new|in|as|if|then|else|elif|for|begin|end|inherit|do|let\!|return\!|return|interface|with|abstract|property|union|enum|member|try|finally|and|when|use|use\!|struct|while|mutable)(?!')\b
325+ scope: keyword.fsharp
327+ scope: keyword.fsharp
328+ - include: constants
329+ - match: '((''|\^)[[:alpha:]0-9''._]+)'
91 captures:
330 captures:
92− 1: keyword.other.binding.fsharp
331+ 1: entity.name.type.fsharp
93− 2: keyword.other.function-recursive.fsharp
332+ - match: (<)
94− 4: constant.language.unit.fsharp
333+ captures:
95− 5: constant.language.ignored.fsharp
334+ 1: keyword.symbol.fsharp
97− - match: ^\s*#\s*(light|if|else|endif|r|I|load|time|help|quit)\b
99− - meta_scope: meta.preprocessor.fsharp
100− - match: (\s|$)
336+ - match: (>)
338+ 1: keyword.symbol.fsharp
101 pop: true
339 pop: true
102− - match: \b(new|in|as|if|then|else|elif|for|begin|end|match|with|type|inherit|true|false|null|do)\b
340+ - match: '((''|\^)[[:alpha:]0-9''._]+)'
342+ 1: entity.name.type.fsharp
343+ - include: tuple_signature
344+ - include: generic_declaration
345+ - match: '(?!when|and|or\b)\b([\w0-9''`^._]+)'
347+ 1: entity.name.type.fsharp
350+ 1: keyword.symbol.fsharp
353+ - match: \b(private|to|public|internal|function|yield!|yield|class|exception|match|delegate|of|new|in|as|if|then|else|elif|for|begin|end|inherit|do|let\!|return\!|return|interface|with|abstract|property|union|enum|member|try|finally|and|when|or|use|use\!|struct|while|mutable)(?!')\b
103− scope: keyword.other.fsharp
354+ scope: keyword.fsharp
104− - match: '(\|>|\|?>|\->|\<\-|:>|:|\[|\]|\;|\||_)'
355+ - match: '(&&&|\|\|\||\^\^\^|~~~|<<<|>>>|\|>|\->|\<\-|:>|:\?>|:|\[|\]|\;|<>|=|@|\|\||&&|{|}|\||_|\.\.|\,|\+|\-|\*|\/|\^|\!|\>|\>\=|\>\>|\<|\<\=|\(|\)|\<\<)'
105− scope: entity.name
356+ scope: keyword.symbol.fsharp
106− method_calls:
357+ member_declaration:
107− - match: '(?<!\w)([a-z]\w*)(\.)'
358+ - include: comments
359+ - include: common_declaration
360+ - match: (:)\s*(\()\s*(static member|member)
362+ 1: keyword.symbol.fsharp
363+ 2: keyword.symbol.fsharp
109− - meta_scope: meta.method-call.fsharp
110− - match: '[A-Z]\w*(\.)'
366+ - match: (\))\s*((?=,)|(?=\=))
111− scope: meta.method.fsharp
112 captures:
367 captures:
113− 1: punctuation.separator.method-call.fsharp
368+ 1: keyword.symbol.fsharp
115 pop: true
369 pop: true
372+ 1: keyword.symbol.fsharp
376+ 1: keyword.symbol.fsharp
378+ - include: member_declaration
379+ - match: '(\^[[:alpha:]0-9''._]+)'
381+ 1: entity.name.type.fsharp
382+ - include: variables
384+ - match: '(\^[[:alpha:]0-9''._]+)'
386+ 1: entity.name.type.fsharp
387+ - match: \b(and|when|or)\b
388+ scope: keyword.fsharp
390+ scope: keyword.symbol.fsharp
391+ - match: '(\?{0,1})([[:alpha:]0-9''`^._]+|``[[:alpha:]0-9''`^:,._ ]+``)\s*(:{0,1})(\s*([?[:alpha:]0-9''`<>._ ]+)){0,1}'
393+ 1: keyword.symbol.fsharp
394+ 2: variable.parameter.fsharp
395+ 3: keyword.symbol.fsharp
396+ 4: entity.name.type.fsharp
117− - match: '\b(namespace|module)\s+([a-zA-Z][a-zA-Z0-9''_.]*)'
399+ - match: '\b(namespace|module)\s*(public|internal|private)?\s+([[:alpha:]][[:alpha:]0-9''_. ]*)'
403+ 3: entity.name.section.fsharp
405+ - meta_scope: entity.name.section.fsharp
406+ - match: (\s?=|\s|$)
408+ 1: keyword.symbol.fsharp
410+ - match: '(\.)([A-Z][[:alpha:]0-9''_]*)'
411+ scope: entity.name.section.fsharp
413+ 1: punctuation.separator.namespace-reference.fsharp
414+ 2: entity.name.section.fsharp
415+ - match: '\b(open)\s+([[:alpha:]][[:alpha:]0-9''_]*)(?=(\.[A-Z][[:alpha:]0-9_]*)*)'
118 captures:
416 captures:
119− 1: keyword.other.fsharp
417+ 1: keyword.fsharp
120 2: entity.name.section.fsharp
418 2: entity.name.section.fsharp
122− - meta_scope: meta.module.namespace.fsharp
420+ - meta_scope: namespace.open.fsharp
123 - match: (\s|$)
421 - match: (\s|$)
124 pop: true
422 pop: true
125− - match: '(\.)([A-Z][a-zA-Z0-9''_]*)'
423+ - match: '(\.)([[:alpha:]][[:alpha:]0-9''_]*)'
126− scope: support.other.module.fsharp
424+ scope: entity.name.section.fsharp
127 captures:
425 captures:
128− 1: punctuation.separator.module-reference.fsharp
426+ 1: punctuation.separator.namespace-reference.fsharp
129− 2: support.other.module.fsharp
427+ 2: entity.name.section.fsharp
130− - match: '\b(open)\s+([A-Z][a-zA-Z0-9''_]*)(?=(\.[A-Z][a-zA-Z0-9_]*)*)'
428+ - match: '^\s*(module)\s+([A-Z][[:alpha:]0-9''_]*)\s*(=)\s*([A-Z][[:alpha:]0-9''_]*)'
131 captures:
429 captures:
132− 1: keyword.other.fsharp
430+ 1: keyword.fsharp
133− 2: support.other.module.fsharp
431+ 2: entity.name.type.namespace.fsharp
432+ 3: punctuation.separator.namespace-definition.fsharp
433+ 4: entity.name.section.fsharp
135− - meta_scope: meta.module.open.fsharp
435+ - meta_scope: namespace.alias.fsharp
136 - match: (\s|$)
436 - match: (\s|$)
137 pop: true
437 pop: true
138− - match: '(\.)([A-Z][a-zA-Z0-9''_]*)'
438+ - match: '(\.)([A-Z][[:alpha:]0-9''_]*)'
139− scope: support.other.module.fsharp
439+ scope: entity.name.section.fsharp
140 captures:
440 captures:
141− 1: punctuation.separator.module-reference.fsharp
441+ 1: punctuation.separator.namespace-reference.fsharp
142− 2: support.other.module.fsharp
442+ 2: entity.name.section.fsharp
143− - match: '^\s*(module)\s+([A-Z][a-zA-Z0-9''_]*)\s*(=)\s*([A-Z][a-zA-Z0-9''_]*)'
443+ record_declaration:
144 captures:
445 captures:
145− 1: keyword.other.module-definition.fsharp
446+ 1: keyword.symbol.fsharp
146− 2: entity.name.type.module.fsharp
147− 3: punctuation.separator.module-definition.fsharp
148− 4: support.other.module.fsharp
150− - meta_scope: meta.module.alias.fsharp
151− - match: (\s|$)
448+ - match: '(?<=\})'
152 pop: true
449 pop: true
153− - match: '(\.)([A-Z][a-zA-Z0-9''_]*)'
450+ - include: comments
154− scope: support.other.module.fsharp
451+ - match: '(((mutable)\s[[:alpha:]]+)|[[:alpha:]0-9''`<>^._]*)\s*((?<!:):(?!:))\s*'
155 captures:
452 captures:
156− 1: punctuation.separator.module-reference.fsharp
453+ 3: keyword.fsharp
157− 2: support.other.module.fsharp
454+ 4: keyword.symbol.fsharp
158− - match: '(?<!\w)([A-Z][a-zA-Z0-9_]*)(\.)'
455+ push:
458+ 1: keyword.symbol.fsharp
461+ - match: "([[:alpha:]0-9'`^_ ]+)"
463+ 1: entity.name.type.fsharp
465+ - include: compiler_directives
466+ - include: constants
469+ - include: double_tick
470+ - include: definition
471+ - include: attributes
472+ - include: anonymous_functions
477+ - match: "[[:alpha:]0-9'`^_ ]+(=)([[:alpha:]0-9'`^_ ]+)"
159 captures:
478 captures:
160− 1: support.other.module.fsharp
479+ 1: keyword.symbol.fsharp
161− 2: punctuation.separator.module-reference.fsharp
480+ 2: variable.parameter.fsharp
483+ 1: keyword.symbol.fsharp
163− - meta_scope: meta.module.reference.fsharp
164− - match: '[A-Z][a-zA-Z0-9_]+(\.)'
485+ - match: "(})"
165− scope: support.other.module.fsharp
166 captures:
486 captures:
167− 1: punctuation.separator.module-reference.fsharp
487+ 1: keyword.symbol.fsharp
169 pop: true
488 pop: true
489+ - match: "[[:alpha:]0-9'`^_ ]+(=)([[:alpha:]0-9'`^_ ]+)"
491+ 1: keyword.symbol.fsharp
492+ 2: variable.parameter.fsharp
493+ - include: record_signature
496+ - match: '\b(type)[\s]+(private|internal|public)?\s*'
501+ - meta_scope: record.fsharp
502+ - match: '\s*((with)|((as)\s+([[:alpha:]0-9'']+))|(=)|[\n=]|(\(\)))'
507+ 5: variable.parameter.fsharp
508+ 6: keyword.symbol.fsharp
509+ 7: constant.language.unit.fsharp
512+ - include: attributes
513+ - match: "([[:alpha:]0-9'^._]+|``[[:alpha:]0-9'`^:,._ ]+``)"
515+ 1: entity.name.type.fsharp
524+ - match: '((''|\^)``[[:alpha:]0-9`^:,._ ]+``|(''|\^)[[:alpha:]0-9`^:._]+)'
526+ 1: entity.name.type.fsharp
527+ - match: \b(interface|with|abstract|and|when|or|not|struct|equality|comparison|unmanaged|delegate|enum)\b
528+ scope: keyword.fsharp
531+ 1: keyword.symbol.fsharp
535+ 1: keyword.symbol.fsharp
537+ - match: (static member|member|new)
540+ - include: common_binding_definition
541+ - match: '([\w0-9''`^._]+)'
543+ 1: entity.name.type.fsharp
545+ - match: \s*(private|internal|public)
547+ 1: keyword.symbol.fsharp
551+ 1: keyword.symbol.fsharp
553+ - match: '\s*(?=(=)|[\n=]|(\(\))|(as))'
555+ 1: keyword.symbol.fsharp
557+ - include: member_declaration
560+ - match: (%0?-?(\d+)?((a|t)|(\.\d+)?(f|F|e|E|g|G|M)|(b|c|s|d|i|x|X|o|u)|(s|b|O)|(\+?A)))
561+ scope: entity.name.type.format.specifier.fsharp
563+ 1: keyword.format.specifier.fsharp
171− - match: '(?=[^\\])(""")'
565+ - match: '(?=[^\\])(@")'
172 captures:
566 captures:
173 1: punctuation.definition.string.begin.fsharp
567 1: punctuation.definition.string.begin.fsharp
175− - meta_scope: string.quoted.double.fsharp
569+ - meta_scope: string.quoted.literal.fsharp
176− - match: (""")
570+ - match: (")(?!")
177 captures:
571 captures:
178 1: punctuation.definition.string.end.fsharp
572 1: punctuation.definition.string.end.fsharp
179 pop: true
573 pop: true
180− - match: '\\$[ \t]*'
574+ - match: '"(")'
181− scope: punctuation.separator.string.ignore-eol.fsharp
575+ scope: constant.character.string.escape.fsharp
182− - match: '(?=[^\\])(@")'
576+ - match: '(?=[^\\])(""")'
183 captures:
577 captures:
184 1: punctuation.definition.string.begin.fsharp
578 1: punctuation.definition.string.begin.fsharp
186− - meta_scope: string.quoted.double.fsharp
580+ - meta_scope: string.quoted.triple.fsharp
187− - match: (")
581+ - match: (""")
188 captures:
582 captures:
189 1: punctuation.definition.string.end.fsharp
583 1: punctuation.definition.string.end.fsharp
190 pop: true
584 pop: true
191− - match: '\\$[ \t]*'
585+ - include: string_formatter
192− scope: punctuation.separator.string.ignore-eol.fsharp
193 - match: '(?=[^\\])(")'
586 - match: '(?=[^\\])(")'
194 captures:
587 captures:
195 1: punctuation.definition.string.begin.fsharp
588 1: punctuation.definition.string.begin.fsharp
@@ -201,34 +594,79 @@ contexts:
201 pop: true
594 pop: true
202 - match: '\\$[ \t]*'
595 - match: '\\$[ \t]*'
203 scope: punctuation.separator.string.ignore-eol.fsharp
596 scope: punctuation.separator.string.ignore-eol.fsharp
204− - match: '\\([\\''ntbr]|u[a-fA-F0-9]{4}|u[a-fA-F0-9]{8})'
597+ - match: '\\([\\''''ntbr]|u[a-fA-F0-9]{4}|u[a-fA-F0-9]{8})'
205 scope: constant.character.string.escape.fsharp
598 scope: constant.character.string.escape.fsharp
206− - match: '\\(?![\\''ntbr]|u[a-fA-F0-9]{4}|u[a-fA-F0-9]{8}).'
599+ - match: '\\(?![\\''''ntbr]|u[a-fA-F0-9]{4}|u[a-fA-F0-9]{8}).'
207 scope: invalid.illeagal.character.string.fsharp
600 scope: invalid.illeagal.character.string.fsharp
601+ - include: string_formatter
208− - match: '(?=[^\\])('')'
603+ - match: (\()
209 captures:
604 captures:
210− 1: punctuation.definition.string.begin.fsharp
605+ 1: keyword.symbol.fsharp
212− - meta_scope: string.quoted.double.fsharp
213− - match: (')
607+ - match: (\))
214 captures:
608 captures:
215− 1: punctuation.definition.string.end.fsharp
609+ 1: keyword.symbol.fsharp
216 pop: true
610 pop: true
217− - match: '\\$[ \t]*'
611+ - include: strp_inlined_body
218− scope: punctuation.separator.string.ignore-eol.fsharp
612+ strp_inlined_body:
219− - match: '\\([\\"ntbr]|u[a-fA-F0-9]{4}|u[a-fA-F0-9]{8})'
613+ - include: comments
220− scope: constant.character.string.escape.fsharp
614+ - include: anonymous_functions
221− - match: '\\(?![\\"ntbr]|u[a-fA-F0-9]{4}|u[a-fA-F0-9]{8}).'
615+ - match: '(\^[[:alpha:]0-9''._]+)'
222− scope: invalid.illeagal.character.string.fsharp
616+ captures:
223− structure:
617+ 1: entity.name.type.fsharp
618+ - match: \b(and|when|or)\b
619+ scope: keyword.fsharp
224− - match: \(
620+ - match: (\()
622+ 1: keyword.symbol.fsharp
226− - meta_scope: meta.paren-group.fsharp
227− - match: \)
624+ - match: (\))
626+ 1: keyword.symbol.fsharp
228 pop: true
627 pop: true
229− - include: main
628+ - include: strp_inlined_body
629+ - match: '(static member|member)\s*([[:alpha:]0-9''`<>^._]+|``[[:alpha:]0-9'' <>^._]+``)\s*(:)'
633+ 3: keyword.symbol.fsharp
634+ - include: compiler_directives
635+ - include: constants
638+ - include: double_tick
641+ - include: definition
642+ - include: attributes
650+ - match: "(([?[:alpha:]0-9'`^._ ]+))+"
652+ 1: entity.name.type.fsharp
655+ 1: keyword.symbol.fsharp
659+ 1: keyword.symbol.fsharp
661+ - match: "(([?[:alpha:]0-9'`^._ ]+))+"
663+ 1: entity.name.type.fsharp
664+ - include: tuple_signature
230 variables:
666 variables:
231 - match: \(\)
667 - match: \(\)
232− scope: variable.parameter.unit.fsharp
668+ scope: constant.language.unit.fsharp
233− - match: '[a-zA-Z]\w*'
669+ - match: '(\?{0,1})(``[[:alpha:]0-9''`^:,._ ]+``|[[:alpha:]0-9''`<>^._ ]\w*)'
671+ 1: keyword.symbol.fsharp
234− scope: variable.parameter.fsharp
672+ 2: variable.parameter.fsharp