Skip to content

Commit 772aaf7

Browse files
committed
update grammars
1 parent b61725b commit 772aaf7

24 files changed

Lines changed: 1632 additions & 842 deletions

File tree

extensions/bat/syntaxes/batchfile.tmLanguage.json

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
55
"Once accepted there, we are happy to receive an update request."
66
],
7-
"version": "https://github.com/mmims/language-batchfile/commit/6235c491be4dff49cd3966b50142874d7f79580a",
7+
"version": "https://github.com/mmims/language-batchfile/commit/4b67596631b4ecd2c89c2ec1b2e08a6623438903",
88
"name": "Batch File",
99
"scopeName": "source.batchfile",
1010
"patterns": [
@@ -163,12 +163,6 @@
163163
"end": "(?=$\\n|[&|><)])",
164164
"name": "meta.expression.set.batchfile",
165165
"patterns": [
166-
{
167-
"include": "#command_set_inside_arithmetic"
168-
},
169-
{
170-
"include": "#command_set_group"
171-
},
172166
{
173167
"begin": "\"",
174168
"beginCaptures": {
@@ -194,6 +188,12 @@
194188
"include": "#variables"
195189
}
196190
]
191+
},
192+
{
193+
"include": "#command_set_inside_arithmetic"
194+
},
195+
{
196+
"include": "#command_set_group"
197197
}
198198
]
199199
},
@@ -266,8 +266,15 @@
266266
"command_set_operators": {
267267
"patterns": [
268268
{
269-
"match": "\\+\\=|\\-\\=|\\*\\=|/\\=|%%\\=|&\\=|\\|\\=|\\^\\=|<<\\=|>>\\=",
270-
"name": "keyword.operator.assignment.augmented.batchfile"
269+
"match": "([^ ]*)(\\+\\=|\\-\\=|\\*\\=|\\/\\=|%%\\=|&\\=|\\|\\=|\\^\\=|<<\\=|>>\\=)",
270+
"captures": {
271+
"1": {
272+
"name": "variable.other.readwrite.batchfile"
273+
},
274+
"2": {
275+
"name": "keyword.operator.assignment.augmented.batchfile"
276+
}
277+
}
271278
},
272279
{
273280
"match": "\\+|\\-|/|\\*|%%|\\||&|\\^|<<|>>|~",
@@ -278,8 +285,15 @@
278285
"name": "keyword.operator.logical.batchfile"
279286
},
280287
{
281-
"match": "=",
282-
"name": "keyword.operator.assignment.batchfile"
288+
"match": "([^ ][^=]*)(=)",
289+
"captures": {
290+
"1": {
291+
"name": "variable.other.readwrite.batchfile"
292+
},
293+
"2": {
294+
"name": "keyword.operator.assignment.batchfile"
295+
}
296+
}
283297
}
284298
]
285299
},

extensions/css/syntaxes/css.tmLanguage.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

extensions/fsharp/syntaxes/fsharp.tmLanguage.json

Lines changed: 164 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
55
"Once accepted there, we are happy to receive an update request."
66
],
7-
"version": "https://github.com/ionide/ionide-fsgrammar/commit/e15bff40cf4bc42c82bcbdb2a836e4b944b3ef3e",
7+
"version": "https://github.com/ionide/ionide-fsgrammar/commit/bd8d1225f93894a50bc8da6f5a76409b024d3d22",
88
"name": "fsharp",
99
"scopeName": "source.fsharp",
1010
"patterns": [
@@ -41,6 +41,9 @@
4141
{
4242
"include": "#anonymous_functions"
4343
},
44+
{
45+
"include": "#du_declaration"
46+
},
4447
{
4548
"include": "#keywords"
4649
},
@@ -95,6 +98,35 @@
9598
},
9699
"comments": {
97100
"patterns": [
101+
{
102+
"name": "comment.block.markdown.fsharp",
103+
"begin": "^\\s*(\\(\\*\\*(?!\\)))(?!\\*\\))$",
104+
"while": "^(?!\\s*\\*\\)$)",
105+
"beginCaptures": {
106+
"1": {
107+
"name": "comment.block.fsharp"
108+
}
109+
},
110+
"endCaptures": {
111+
"1": {
112+
"name": "comment.block.fsharp"
113+
}
114+
},
115+
"patterns": [
116+
{
117+
"include": "text.html.markdown"
118+
}
119+
]
120+
},
121+
{
122+
"name": "comment.block.markdown.fsharp.end",
123+
"match": "^(\\s*\\*\\)$)",
124+
"captures": {
125+
"1": {
126+
"name": "comment.block.fsharp"
127+
}
128+
}
129+
},
98130
{
99131
"name": "comment.block.fsharp",
100132
"begin": "(\\(\\*(?!\\)))",
@@ -110,6 +142,16 @@
110142
}
111143
}
112144
},
145+
{
146+
"name": "comment.line.markdown.fsharp",
147+
"begin": "///",
148+
"while": "///",
149+
"patterns": [
150+
{
151+
"include": "text.html.markdown"
152+
}
153+
]
154+
},
113155
{
114156
"name": "comment.line.double-slash.fsharp",
115157
"match": "//.*$"
@@ -140,8 +182,8 @@
140182
"patterns": [
141183
{
142184
"name": "binding.fsharp",
143-
"begin": "\\b(val mutable|val|let mutable|let inline|let|member|static member|override|let!)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\([^-]*\\)|\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9,\\._]|(?<=,)\\s)*|``[_[:alpha:]]([_[:alpha:]0-9,\\._`\\s]|(?<=,)\\s)*)",
144-
"end": "((``.*``)|(with)|=|$)",
185+
"begin": "\\b(val mutable|val|let mutable|let inline|let|member|static member|override|let!)(\\s+rec|mutable)?(\\s+\\[\\<.*\\>\\])?\\s*(private|internal|public)?\\s+(\\[[^-=]*\\]|[_[:alpha:]]([_[:alpha:]0-9,\\._]|(?<=,)\\s)*|``[_[:alpha:]]([_[:alpha:]0-9,\\._`\\s]|(?<=,)\\s)*)?",
186+
"end": "((``.*``)|(with)\\b|=|$)",
145187
"beginCaptures": {
146188
"1": {
147189
"name": "keyword.other.binding.fsharp"
@@ -173,6 +215,76 @@
173215
"patterns": [
174216
{
175217
"include": "#variables"
218+
},
219+
{
220+
"include": "#member_declaration"
221+
},
222+
{
223+
"match": "(:)(\\s*([?[:alpha:]0-9'<>^._ ]+))*",
224+
"captures": {
225+
"1": {
226+
"name": "keyword.other.fsharp"
227+
},
228+
"2": {
229+
"name": "entity.name.type.fsharp"
230+
}
231+
}
232+
}
233+
]
234+
}
235+
]
236+
},
237+
"du_declaration": {
238+
"patterns": [
239+
{
240+
"name": "du_declaration.fsharp",
241+
"begin": "\\b(of)\\b",
242+
"end": "$|(\\|)",
243+
"beginCaptures": {
244+
"1": {
245+
"name": "keyword.other.fsharp"
246+
}
247+
},
248+
"endCaptures": {
249+
"1": {
250+
"name": "keyword.other.fsharp"
251+
}
252+
},
253+
"patterns": [
254+
{
255+
"match": "([[:alpha:]0-9'`<>^._]+)\\s*(:)\\s*([[:alpha:]0-9'`<>^._]+)",
256+
"captures": {
257+
"1": {
258+
"name": "variable.parameter.fsharp"
259+
},
260+
"2": {
261+
"name": "keyword.other.fsharp"
262+
},
263+
"3": {
264+
"name": "entity.name.type.fsharp"
265+
}
266+
}
267+
},
268+
{
269+
"match": "([[:alpha:]0-9'`<>^._]+)",
270+
"captures": {
271+
"1": {
272+
"name": "entity.name.type.fsharp"
273+
}
274+
}
275+
},
276+
{
277+
"begin": "\\(",
278+
"end": "\\)",
279+
"match": "([[:alpha:]0-9'`<>^._]+)",
280+
"captures": {
281+
"1": {
282+
"name": "entity.name.type.fsharp"
283+
}
284+
}
285+
},
286+
{
287+
"include": "#keywords"
176288
}
177289
]
178290
}
@@ -182,7 +294,7 @@
182294
"patterns": [
183295
{
184296
"name": "keyword.other.fsharp",
185-
"match": "\\b(function|yield!|yield|class|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"
297+
"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"
186298
},
187299
{
188300
"name": "meta.preprocessor.fsharp",
@@ -391,6 +503,30 @@
391503
}
392504
]
393505
},
506+
"member_declaration": {
507+
"patterns": [
508+
{
509+
"begin": "\\(",
510+
"end": "\\)",
511+
"patterns": [
512+
{
513+
"match": "\\?{0,1}([[:alpha:]0-9'`<>^._]+)\\s*(:{0,1})(\\s*([?[:alpha:]0-9'<>^._ ]+)){0,1}",
514+
"captures": {
515+
"1": {
516+
"name": "variable.parameter.fsharp"
517+
},
518+
"2": {
519+
"name": "keyword.other.fsharp"
520+
},
521+
"3": {
522+
"name": "entity.name.type.fsharp"
523+
}
524+
}
525+
}
526+
]
527+
}
528+
]
529+
},
394530
"double_tick": {
395531
"patterns": [
396532
{
@@ -414,8 +550,9 @@
414550
"patterns": [
415551
{
416552
"name": "record.fsharp",
417-
"match": "(type)[\\s]+(private|internal|public)?[\\s]*([[:alpha:]0-9'<>^:,._]+)[\\s]*(\\([[:alpha:]0-9'<>^:,._ ]+\\))?[\\s]*((with)|(as [[:alpha:]0-9']+)|(=)|(\\(\\)))",
418-
"captures": {
553+
"begin": "(type)[\\s]+(private|internal|public)?[\\s]*([[:alpha:]0-9'<>^:,._]+)[\\s]?(private|internal|public)?[\\s]*",
554+
"end": "[\\s]*((with)|((as) ([[:alpha:]0-9']+))|(=)|[\\n=]|(\\(\\)))",
555+
"beginCaptures": {
419556
"1": {
420557
"name": "keyword.other.fsharp"
421558
},
@@ -426,31 +563,44 @@
426563
"name": "entity.name.type.fsharp"
427564
},
428565
"4": {
429-
"name": "entity.name.type.fsharp"
566+
"name": "keyword.other.fsharp"
567+
}
568+
},
569+
"endCaptures": {
570+
"2": {
571+
"name": "keyword.other.fsharp"
430572
},
431-
"6": {
573+
"3": {
432574
"name": "keyword.other.fsharp"
433575
},
434-
"7": {
576+
"4": {
435577
"name": "keyword.other.fsharp"
436578
},
437-
"8": {
579+
"5": {
580+
"name": "variable.parameter.fsharp"
581+
},
582+
"6": {
438583
"name": "keyword.other.fsharp"
439584
},
440-
"9": {
585+
"7": {
441586
"name": "constant.language.unit.fsharp"
442587
}
443-
}
588+
},
589+
"patterns": [
590+
{
591+
"include": "#member_declaration"
592+
}
593+
]
444594
}
445595
]
446596
},
447597
"cexprs": {
448598
"patterns": [
449599
{
450600
"name": "cexpr.fsharp",
451-
"match": "\\b([[:alpha:]]*\\s+\\{)",
601+
"match": "\\b(async|seq|promise|task|maybe|asyncMaybe|controller|scope|application|pipeline)\\s*\\{",
452602
"captures": {
453-
"1": {
603+
"0": {
454604
"name": "keyword.other.fsharp"
455605
}
456606
}

0 commit comments

Comments
 (0)