tm-grammars 1.26.0 → 1.27.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +474 -3
- package/README.md +34 -31
- package/grammars/apex.json +1 -1
- package/grammars/blade.json +91 -16
- package/grammars/c3.json +1982 -0
- package/grammars/csharp.json +132 -19
- package/grammars/fortran-fixed-form.json +37 -0
- package/grammars/fortran-free-form.json +178 -49
- package/grammars/gn.json +155 -0
- package/grammars/go.json +3 -0
- package/grammars/kusto.json +1 -1
- package/grammars/latex.json +51 -10
- package/grammars/lean.json +0 -4
- package/grammars/lua.json +28 -5
- package/grammars/luau.json +2 -2
- package/grammars/markdown-nix.json +2 -2
- package/grammars/markdown-vue.json +1 -1
- package/grammars/marko.json +8 -8
- package/grammars/mermaid.json +68 -4
- package/grammars/mojo.json +1 -1
- package/grammars/moonbit.json +393 -0
- package/grammars/php.json +5 -1
- package/grammars/proto.json +5 -5
- package/grammars/r.json +325 -669
- package/grammars/razor.json +134 -19
- package/grammars/svelte.json +13 -2
- package/grammars/vue-directives.json +1 -1
- package/grammars/vue-interpolations.json +1 -1
- package/grammars/vue.json +269 -29
- package/index.js +213 -157
- package/package.json +1 -1
package/grammars/csharp.json
CHANGED
|
@@ -313,7 +313,7 @@
|
|
|
313
313
|
]
|
|
314
314
|
},
|
|
315
315
|
"array-creation-expression": {
|
|
316
|
-
"begin": "\\b(new|stackalloc)\\b\\s*(?<type_name>(?:(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*::\\s*)?(?<name_and_type_args>\\g<identifier>\\s*(?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?)(?:\\s*\\.\\s*\\g<name_and_type_args>)*|(?<tuple>\\s*\\((?:[^()]|\\g<tuple>)+\\)))(?:\\s*\\?\\s*)?(?:\\s*\\[(?:\\s*,\\s*)*]\\s*\\??\\s*)*)?\\s*(?=\\[)",
|
|
316
|
+
"begin": "\\b(new|stackalloc)\\b\\s*(?<type_name>(?:(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*::\\s*)?(?<name_and_type_args>\\g<identifier>\\s*(?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?)(?:\\s*\\.\\s*\\g<name_and_type_args>)*|(?<tuple>\\s*\\((?:[^()]|\\g<tuple>)+\\)))(?:\\s*\\*\\s*)*(?:\\s*\\?\\s*)?(?:\\s*\\[(?:\\s*,\\s*)*]\\s*\\??\\s*)*)?\\s*(?=\\[)",
|
|
317
317
|
"beginCaptures": {
|
|
318
318
|
"1": {
|
|
319
319
|
"name": "keyword.operator.expression.$1.cs"
|
|
@@ -441,7 +441,7 @@
|
|
|
441
441
|
]
|
|
442
442
|
},
|
|
443
443
|
"attribute-section": {
|
|
444
|
-
"begin": "(\\[)(assembly|module|field|event|method|param|property|return|type)?(:)?",
|
|
444
|
+
"begin": "(\\[)(assembly|module|field|event|method|param|property|return|typevar|type)?(:)?",
|
|
445
445
|
"beginCaptures": {
|
|
446
446
|
"1": {
|
|
447
447
|
"name": "punctuation.squarebracket.open.cs"
|
|
@@ -495,6 +495,33 @@
|
|
|
495
495
|
}
|
|
496
496
|
]
|
|
497
497
|
},
|
|
498
|
+
"base-class-constructor-call": {
|
|
499
|
+
"begin": "(?:(@?[_[:alpha:]][_[:alnum:]]*)\\s*(\\.))*(@?[_[:alpha:]][_[:alnum:]]*)\\s*(<(?<type_args>[^()<>]|\\((?:[^()<>]|<[^()<>]*>|\\([^()<>]*\\))*\\)|<\\g<type_args>*>)*>\\s*)?(?=\\()",
|
|
500
|
+
"beginCaptures": {
|
|
501
|
+
"1": {
|
|
502
|
+
"name": "entity.name.type.cs"
|
|
503
|
+
},
|
|
504
|
+
"2": {
|
|
505
|
+
"name": "punctuation.accessor.cs"
|
|
506
|
+
},
|
|
507
|
+
"3": {
|
|
508
|
+
"name": "entity.name.type.cs"
|
|
509
|
+
},
|
|
510
|
+
"4": {
|
|
511
|
+
"patterns": [
|
|
512
|
+
{
|
|
513
|
+
"include": "#type-arguments"
|
|
514
|
+
}
|
|
515
|
+
]
|
|
516
|
+
}
|
|
517
|
+
},
|
|
518
|
+
"end": "(?<=\\))",
|
|
519
|
+
"patterns": [
|
|
520
|
+
{
|
|
521
|
+
"include": "#argument-list"
|
|
522
|
+
}
|
|
523
|
+
]
|
|
524
|
+
},
|
|
498
525
|
"base-types": {
|
|
499
526
|
"begin": ":",
|
|
500
527
|
"beginCaptures": {
|
|
@@ -504,6 +531,9 @@
|
|
|
504
531
|
},
|
|
505
532
|
"end": "(?=\\{|where|;)",
|
|
506
533
|
"patterns": [
|
|
534
|
+
{
|
|
535
|
+
"include": "#base-class-constructor-call"
|
|
536
|
+
},
|
|
507
537
|
{
|
|
508
538
|
"include": "#type"
|
|
509
539
|
},
|
|
@@ -870,9 +900,15 @@
|
|
|
870
900
|
{
|
|
871
901
|
"include": "#type-declarations"
|
|
872
902
|
},
|
|
903
|
+
{
|
|
904
|
+
"include": "#constructor-declaration"
|
|
905
|
+
},
|
|
873
906
|
{
|
|
874
907
|
"include": "#property-declaration"
|
|
875
908
|
},
|
|
909
|
+
{
|
|
910
|
+
"include": "#fixed-size-buffer-declaration"
|
|
911
|
+
},
|
|
876
912
|
{
|
|
877
913
|
"include": "#field-declaration"
|
|
878
914
|
},
|
|
@@ -885,9 +921,6 @@
|
|
|
885
921
|
{
|
|
886
922
|
"include": "#variable-initializer"
|
|
887
923
|
},
|
|
888
|
-
{
|
|
889
|
-
"include": "#constructor-declaration"
|
|
890
|
-
},
|
|
891
924
|
{
|
|
892
925
|
"include": "#destructor-declaration"
|
|
893
926
|
},
|
|
@@ -1042,17 +1075,14 @@
|
|
|
1042
1075
|
]
|
|
1043
1076
|
},
|
|
1044
1077
|
"constructor-declaration": {
|
|
1045
|
-
"begin": "(
|
|
1078
|
+
"begin": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(?=\\(|$)",
|
|
1079
|
+
"beginCaptures": {
|
|
1080
|
+
"1": {
|
|
1081
|
+
"name": "entity.name.function.cs"
|
|
1082
|
+
}
|
|
1083
|
+
},
|
|
1046
1084
|
"end": "(?<=})|(?=;)",
|
|
1047
1085
|
"patterns": [
|
|
1048
|
-
{
|
|
1049
|
-
"captures": {
|
|
1050
|
-
"1": {
|
|
1051
|
-
"name": "entity.name.function.cs"
|
|
1052
|
-
}
|
|
1053
|
-
},
|
|
1054
|
-
"match": "(@?[_[:alpha:]][_[:alnum:]]*)\\b"
|
|
1055
|
-
},
|
|
1056
1086
|
{
|
|
1057
1087
|
"begin": "(:)",
|
|
1058
1088
|
"beginCaptures": {
|
|
@@ -1696,6 +1726,12 @@
|
|
|
1696
1726
|
{
|
|
1697
1727
|
"include": "#is-expression"
|
|
1698
1728
|
},
|
|
1729
|
+
{
|
|
1730
|
+
"include": "#boolean-literal"
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
"include": "#null-literal"
|
|
1734
|
+
},
|
|
1699
1735
|
{
|
|
1700
1736
|
"include": "#anonymous-method-expression"
|
|
1701
1737
|
},
|
|
@@ -1889,6 +1925,33 @@
|
|
|
1889
1925
|
}
|
|
1890
1926
|
]
|
|
1891
1927
|
},
|
|
1928
|
+
"fixed-size-buffer-declaration": {
|
|
1929
|
+
"begin": "\\b(fixed)\\b\\s+(?<type_name>(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*::\\s*)?(?<name_and_type_args>\\g<identifier>\\s*(?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?)(?:\\s*\\.\\s*\\g<name_and_type_args>)*)\\s+(\\g<identifier>)\\s*(?=\\[)",
|
|
1930
|
+
"beginCaptures": {
|
|
1931
|
+
"1": {
|
|
1932
|
+
"name": "storage.modifier.fixed.cs"
|
|
1933
|
+
},
|
|
1934
|
+
"2": {
|
|
1935
|
+
"patterns": [
|
|
1936
|
+
{
|
|
1937
|
+
"include": "#type"
|
|
1938
|
+
}
|
|
1939
|
+
]
|
|
1940
|
+
},
|
|
1941
|
+
"6": {
|
|
1942
|
+
"name": "entity.name.variable.field.cs"
|
|
1943
|
+
}
|
|
1944
|
+
},
|
|
1945
|
+
"end": "(?=;)",
|
|
1946
|
+
"patterns": [
|
|
1947
|
+
{
|
|
1948
|
+
"include": "#bracketed-argument-list"
|
|
1949
|
+
},
|
|
1950
|
+
{
|
|
1951
|
+
"include": "#comment"
|
|
1952
|
+
}
|
|
1953
|
+
]
|
|
1954
|
+
},
|
|
1892
1955
|
"fixed-statement": {
|
|
1893
1956
|
"begin": "\\b(fixed)\\b",
|
|
1894
1957
|
"beginCaptures": {
|
|
@@ -1957,6 +2020,15 @@
|
|
|
1957
2020
|
},
|
|
1958
2021
|
{
|
|
1959
2022
|
"include": "#local-variable-declaration"
|
|
2023
|
+
},
|
|
2024
|
+
{
|
|
2025
|
+
"include": "#local-tuple-var-deconstruction"
|
|
2026
|
+
},
|
|
2027
|
+
{
|
|
2028
|
+
"include": "#tuple-deconstruction-assignment"
|
|
2029
|
+
},
|
|
2030
|
+
{
|
|
2031
|
+
"include": "#expression"
|
|
1960
2032
|
}
|
|
1961
2033
|
]
|
|
1962
2034
|
},
|
|
@@ -2726,6 +2798,9 @@
|
|
|
2726
2798
|
},
|
|
2727
2799
|
{
|
|
2728
2800
|
"include": "#local-tuple-var-deconstruction"
|
|
2801
|
+
},
|
|
2802
|
+
{
|
|
2803
|
+
"include": "#local-tuple-declaration-deconstruction"
|
|
2729
2804
|
}
|
|
2730
2805
|
]
|
|
2731
2806
|
},
|
|
@@ -2776,6 +2851,18 @@
|
|
|
2776
2851
|
}
|
|
2777
2852
|
]
|
|
2778
2853
|
},
|
|
2854
|
+
"local-tuple-declaration-deconstruction": {
|
|
2855
|
+
"captures": {
|
|
2856
|
+
"1": {
|
|
2857
|
+
"patterns": [
|
|
2858
|
+
{
|
|
2859
|
+
"include": "#tuple-declaration-deconstruction-element-list"
|
|
2860
|
+
}
|
|
2861
|
+
]
|
|
2862
|
+
}
|
|
2863
|
+
},
|
|
2864
|
+
"match": "(?<tuple>\\((?:[^()]|\\g<tuple>)+\\))\\s*(?!=[=>])(?==)"
|
|
2865
|
+
},
|
|
2779
2866
|
"local-tuple-var-deconstruction": {
|
|
2780
2867
|
"begin": "\\b(var)\\b\\s*(?<tuple>\\((?:[^()]|\\g<tuple>)+\\))\\s*(?=[);=])",
|
|
2781
2868
|
"beginCaptures": {
|
|
@@ -2801,7 +2888,7 @@
|
|
|
2801
2888
|
]
|
|
2802
2889
|
},
|
|
2803
2890
|
"local-variable-declaration": {
|
|
2804
|
-
"begin": "(?:(?:\\b(ref)\\s+(?:\\b(readonly)\\s+)?)?\\b(var)\\b|(?<type_name>(?:ref\\s+(?:readonly\\s+)?)?(?:(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*::\\s*)?(?<name_and_type_args>\\g<identifier>\\s*(?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?)(?:\\s*\\.\\s*\\g<name_and_type_args>)*|(?<tuple>\\s*\\((?:[^()]|\\g<tuple>)+\\)))(?:\\s*
|
|
2891
|
+
"begin": "(?:(?:\\b(ref)\\s+(?:\\b(readonly)\\s+)?)?\\b(var)\\b|(?<type_name>(?:ref\\s+(?:readonly\\s+)?)?(?:(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*::\\s*)?(?<name_and_type_args>\\g<identifier>\\s*(?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?)(?:\\s*\\.\\s*\\g<name_and_type_args>)*|(?<tuple>\\s*\\((?:[^()]|\\g<tuple>)+\\)))(?:\\s*\\*\\s*)*(?:\\s*\\?\\s*)?(?:\\s*\\[(?:\\s*,\\s*)*]\\s*\\??\\s*)*))\\s+(\\g<identifier>)\\s*(?!=>)(?=[),;=])",
|
|
2805
2892
|
"beginCaptures": {
|
|
2806
2893
|
"1": {
|
|
2807
2894
|
"name": "storage.modifier.ref.cs"
|
|
@@ -3469,7 +3556,7 @@
|
|
|
3469
3556
|
"name": "meta.preprocessor.cs",
|
|
3470
3557
|
"patterns": [
|
|
3471
3558
|
{
|
|
3472
|
-
"include": "#comment"
|
|
3559
|
+
"include": "#preprocessor-comment"
|
|
3473
3560
|
},
|
|
3474
3561
|
{
|
|
3475
3562
|
"include": "#preprocessor-define-or-undef"
|
|
@@ -3632,6 +3719,29 @@
|
|
|
3632
3719
|
},
|
|
3633
3720
|
"match": "\\b(sdk)\\b\\s*([_[:alpha:]][._[:alnum:]]*)?(@)?(.*)?\\s*"
|
|
3634
3721
|
},
|
|
3722
|
+
"preprocessor-comment": {
|
|
3723
|
+
"patterns": [
|
|
3724
|
+
{
|
|
3725
|
+
"captures": {
|
|
3726
|
+
"1": {
|
|
3727
|
+
"name": "punctuation.definition.comment.cs"
|
|
3728
|
+
}
|
|
3729
|
+
},
|
|
3730
|
+
"match": "(//).*(?=$)",
|
|
3731
|
+
"name": "comment.line.double-slash.cs"
|
|
3732
|
+
},
|
|
3733
|
+
{
|
|
3734
|
+
"begin": "/\\*",
|
|
3735
|
+
"captures": {
|
|
3736
|
+
"0": {
|
|
3737
|
+
"name": "punctuation.definition.comment.cs"
|
|
3738
|
+
}
|
|
3739
|
+
},
|
|
3740
|
+
"end": "\\*/",
|
|
3741
|
+
"name": "comment.block.cs"
|
|
3742
|
+
}
|
|
3743
|
+
]
|
|
3744
|
+
},
|
|
3635
3745
|
"preprocessor-define-or-undef": {
|
|
3636
3746
|
"captures": {
|
|
3637
3747
|
"1": {
|
|
@@ -3726,7 +3836,7 @@
|
|
|
3726
3836
|
"end": "(?=$)",
|
|
3727
3837
|
"patterns": [
|
|
3728
3838
|
{
|
|
3729
|
-
"include": "#comment"
|
|
3839
|
+
"include": "#preprocessor-comment"
|
|
3730
3840
|
},
|
|
3731
3841
|
{
|
|
3732
3842
|
"include": "#preprocessor-expression"
|
|
@@ -3911,10 +4021,13 @@
|
|
|
3911
4021
|
"name": "storage.modifier.$1.cs"
|
|
3912
4022
|
},
|
|
3913
4023
|
{
|
|
3914
|
-
"begin": "\\b(get)\\b\\s*(?=[;{]|=>|//|/\\*|$)",
|
|
4024
|
+
"begin": "(?:\\b(readonly)\\s+)?\\b(get)\\b\\s*(?=[;{]|=>|//|/\\*|$)",
|
|
3915
4025
|
"beginCaptures": {
|
|
3916
4026
|
"1": {
|
|
3917
|
-
"name": "storage.
|
|
4027
|
+
"name": "storage.modifier.readonly.cs"
|
|
4028
|
+
},
|
|
4029
|
+
"2": {
|
|
4030
|
+
"name": "storage.type.accessor.get.cs"
|
|
3918
4031
|
}
|
|
3919
4032
|
},
|
|
3920
4033
|
"end": "(?<=[;}])|(?=})",
|
|
@@ -25,6 +25,43 @@
|
|
|
25
25
|
{
|
|
26
26
|
"include": "#comments"
|
|
27
27
|
},
|
|
28
|
+
{
|
|
29
|
+
"begin": "(?i)^(?=.{5}|(?<!^)\\t)\\s*(?:([0-9]{1,5})\\s+)?(format)\\b",
|
|
30
|
+
"beginCaptures": {
|
|
31
|
+
"1": {
|
|
32
|
+
"name": "constant.numeric.fortran"
|
|
33
|
+
},
|
|
34
|
+
"2": {
|
|
35
|
+
"name": "keyword.control.format.fortran"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"end": "(?=^(?![^\\n!#]{5}\\S))",
|
|
39
|
+
"name": "meta.statement.IO.fortran",
|
|
40
|
+
"patterns": [
|
|
41
|
+
{
|
|
42
|
+
"include": "#comments"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"include": "#line-header"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"match": "!.*$",
|
|
49
|
+
"name": "comment.line.fortran"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"include": "source.fortran.free#string-constant"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"include": "source.fortran.free#numeric-constant"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"include": "source.fortran.free#operators"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"include": "source.fortran.free#format-parentheses"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
},
|
|
28
65
|
{
|
|
29
66
|
"include": "#line-header"
|
|
30
67
|
},
|
|
@@ -198,13 +198,31 @@
|
|
|
198
198
|
"IO-statements": {
|
|
199
199
|
"patterns": [
|
|
200
200
|
{
|
|
201
|
-
"begin": "(?i)\\b(
|
|
201
|
+
"begin": "(?i)\\b(format)(?=\\s*[!\\&(])",
|
|
202
202
|
"beginCaptures": {
|
|
203
203
|
"1": {
|
|
204
|
-
"name": "keyword.control.
|
|
204
|
+
"name": "keyword.control.format.fortran"
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
"end": "(?=[\\n!;])",
|
|
208
|
+
"name": "meta.statement.IO.fortran",
|
|
209
|
+
"patterns": [
|
|
210
|
+
{
|
|
211
|
+
"include": "#comments"
|
|
205
212
|
},
|
|
206
|
-
|
|
207
|
-
"
|
|
213
|
+
{
|
|
214
|
+
"include": "#line-continuation-operator"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"include": "#format-parentheses"
|
|
218
|
+
}
|
|
219
|
+
]
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"begin": "(?i)\\b(?:(backspace)|(close)|(endfile)|(inquire)|(open)|(read)|(rewind)|(write))\\s*(?=\\()",
|
|
223
|
+
"beginCaptures": {
|
|
224
|
+
"1": {
|
|
225
|
+
"name": "keyword.control.backspace.fortran"
|
|
208
226
|
},
|
|
209
227
|
"2": {
|
|
210
228
|
"name": "keyword.control.close.fortran"
|
|
@@ -213,22 +231,22 @@
|
|
|
213
231
|
"name": "keyword.control.endfile.fortran"
|
|
214
232
|
},
|
|
215
233
|
"4": {
|
|
216
|
-
"name": "keyword.control.
|
|
234
|
+
"name": "keyword.control.inquire.fortran"
|
|
217
235
|
},
|
|
218
236
|
"5": {
|
|
219
|
-
"name": "keyword.control.
|
|
237
|
+
"name": "keyword.control.open.fortran"
|
|
220
238
|
},
|
|
221
239
|
"6": {
|
|
222
|
-
"name": "keyword.control.
|
|
240
|
+
"name": "keyword.control.read.fortran"
|
|
223
241
|
},
|
|
224
242
|
"7": {
|
|
225
|
-
"name": "keyword.control.
|
|
243
|
+
"name": "keyword.control.rewind.fortran"
|
|
226
244
|
},
|
|
227
245
|
"8": {
|
|
228
|
-
"name": "keyword.control.
|
|
246
|
+
"name": "keyword.control.write.fortran"
|
|
229
247
|
},
|
|
230
248
|
"9": {
|
|
231
|
-
"name": "
|
|
249
|
+
"name": "punctuation.parentheses.left.fortran"
|
|
232
250
|
}
|
|
233
251
|
},
|
|
234
252
|
"end": "(?=[\\n!;])",
|
|
@@ -398,7 +416,7 @@
|
|
|
398
416
|
"match": "(-)|(\\+)|/(?![/=\\\\])|(\\*\\*)|(\\*)"
|
|
399
417
|
},
|
|
400
418
|
"array-constructor": {
|
|
401
|
-
"begin": "(?=\\s*(\\[|\\(/))",
|
|
419
|
+
"begin": "(?<!\\n)(?=\\s*(\\[|\\(/))",
|
|
402
420
|
"end": "(?<!\\G)",
|
|
403
421
|
"name": "meta.contructor.array",
|
|
404
422
|
"patterns": [
|
|
@@ -699,6 +717,7 @@
|
|
|
699
717
|
"call-statement": {
|
|
700
718
|
"patterns": [
|
|
701
719
|
{
|
|
720
|
+
"applyEndPatternLast": 1,
|
|
702
721
|
"begin": "(?i)\\s*\\b(call)\\b",
|
|
703
722
|
"beginCaptures": {
|
|
704
723
|
"1": {
|
|
@@ -709,25 +728,34 @@
|
|
|
709
728
|
"name": "meta.statement.control.call.fortran",
|
|
710
729
|
"patterns": [
|
|
711
730
|
{
|
|
712
|
-
"begin": "(?i)
|
|
713
|
-
"
|
|
714
|
-
|
|
715
|
-
|
|
731
|
+
"begin": "(?i)(?=\\s*[a-z]\\w*\\s*%)",
|
|
732
|
+
"end": "(?=[\\n!;])",
|
|
733
|
+
"patterns": [
|
|
734
|
+
{
|
|
735
|
+
"include": "#comments"
|
|
716
736
|
},
|
|
717
|
-
|
|
718
|
-
"
|
|
737
|
+
{
|
|
738
|
+
"include": "#line-continuation-operator"
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
"captures": {
|
|
742
|
+
"1": {
|
|
743
|
+
"name": "variable.other.fortran"
|
|
744
|
+
},
|
|
745
|
+
"2": {
|
|
746
|
+
"name": "keyword.accessor.fortran"
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
"match": "(?i)\\s*([a-z]\\w*)\\s*(%)"
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
"captures": {
|
|
753
|
+
"1": {
|
|
754
|
+
"name": "entity.name.function.subroutine.fortran"
|
|
755
|
+
}
|
|
756
|
+
},
|
|
757
|
+
"match": "(?i)\\s*([a-z]\\w*)"
|
|
719
758
|
},
|
|
720
|
-
"3": {
|
|
721
|
-
"name": "entity.name.function.subroutine.fortran"
|
|
722
|
-
}
|
|
723
|
-
},
|
|
724
|
-
"end": "(?<!\\G)",
|
|
725
|
-
"endCaptures": {
|
|
726
|
-
"1": {
|
|
727
|
-
"name": "punctuation.parentheses.right.fortran"
|
|
728
|
-
}
|
|
729
|
-
},
|
|
730
|
-
"patterns": [
|
|
731
759
|
{
|
|
732
760
|
"include": "#parentheses-dummy-variables"
|
|
733
761
|
}
|
|
@@ -2274,6 +2302,104 @@
|
|
|
2274
2302
|
}
|
|
2275
2303
|
]
|
|
2276
2304
|
},
|
|
2305
|
+
"format-descriptor": {
|
|
2306
|
+
"begin": "\\(/",
|
|
2307
|
+
"beginCaptures": {
|
|
2308
|
+
"0": {
|
|
2309
|
+
"name": "punctuation.bracket.left.fortran"
|
|
2310
|
+
}
|
|
2311
|
+
},
|
|
2312
|
+
"contentName": "meta.format-descriptor.fortran",
|
|
2313
|
+
"end": "\\)",
|
|
2314
|
+
"endCaptures": {
|
|
2315
|
+
"0": {
|
|
2316
|
+
"name": "punctuation.bracket.right.fortran"
|
|
2317
|
+
}
|
|
2318
|
+
},
|
|
2319
|
+
"patterns": [
|
|
2320
|
+
{
|
|
2321
|
+
"include": "#comments"
|
|
2322
|
+
},
|
|
2323
|
+
{
|
|
2324
|
+
"include": "#constants"
|
|
2325
|
+
},
|
|
2326
|
+
{
|
|
2327
|
+
"include": "#operators"
|
|
2328
|
+
},
|
|
2329
|
+
{
|
|
2330
|
+
"include": "#parentheses"
|
|
2331
|
+
},
|
|
2332
|
+
{
|
|
2333
|
+
"include": "#intrinsic-functions"
|
|
2334
|
+
},
|
|
2335
|
+
{
|
|
2336
|
+
"include": "#variable"
|
|
2337
|
+
}
|
|
2338
|
+
]
|
|
2339
|
+
},
|
|
2340
|
+
"format-descriptors": {
|
|
2341
|
+
"patterns": [
|
|
2342
|
+
{
|
|
2343
|
+
"captures": {
|
|
2344
|
+
"1": {
|
|
2345
|
+
"name": "keyword.other.format-descriptor.fortran"
|
|
2346
|
+
}
|
|
2347
|
+
},
|
|
2348
|
+
"match": "(?i)(?:\\b|(?<=\\d)|(?<=P))(EN|ES|EX|DT|DC|DP|RC|RD|RN|RP|RU|RZ|BN|BZ|SP|SS|TL|TR|[ABD-GILOPQSTXZ])(?=$|[^A-Z_a-z]|[D-G](?i))"
|
|
2349
|
+
},
|
|
2350
|
+
{
|
|
2351
|
+
"match": "/",
|
|
2352
|
+
"name": "keyword.operator.format.newline.fortran"
|
|
2353
|
+
},
|
|
2354
|
+
{
|
|
2355
|
+
"match": ":",
|
|
2356
|
+
"name": "keyword.operator.format.separator.fortran"
|
|
2357
|
+
},
|
|
2358
|
+
{
|
|
2359
|
+
"match": "[$\\\\]",
|
|
2360
|
+
"name": "keyword.other.format-descriptor.nonstandard.fortran"
|
|
2361
|
+
},
|
|
2362
|
+
{
|
|
2363
|
+
"match": "(?i)(?:\\b|(?<=\\d))\\d+H",
|
|
2364
|
+
"name": "keyword.other.format-descriptor.legacy.fortran"
|
|
2365
|
+
}
|
|
2366
|
+
]
|
|
2367
|
+
},
|
|
2368
|
+
"format-parentheses": {
|
|
2369
|
+
"begin": "\\s*(\\()",
|
|
2370
|
+
"beginCaptures": {
|
|
2371
|
+
"1": {
|
|
2372
|
+
"name": "punctuation.parentheses.left.fortran"
|
|
2373
|
+
}
|
|
2374
|
+
},
|
|
2375
|
+
"end": "(\\))",
|
|
2376
|
+
"endCaptures": {
|
|
2377
|
+
"1": {
|
|
2378
|
+
"name": "punctuation.parentheses.right.fortran"
|
|
2379
|
+
}
|
|
2380
|
+
},
|
|
2381
|
+
"patterns": [
|
|
2382
|
+
{
|
|
2383
|
+
"include": "#comments"
|
|
2384
|
+
},
|
|
2385
|
+
{
|
|
2386
|
+
"include": "#line-continuation-operator"
|
|
2387
|
+
},
|
|
2388
|
+
{
|
|
2389
|
+
"match": "(?:\\b|[-+])\\d+(?=[A-Za-z])",
|
|
2390
|
+
"name": "constant.numeric.fortran"
|
|
2391
|
+
},
|
|
2392
|
+
{
|
|
2393
|
+
"include": "#format-descriptors"
|
|
2394
|
+
},
|
|
2395
|
+
{
|
|
2396
|
+
"include": "#format-parentheses"
|
|
2397
|
+
},
|
|
2398
|
+
{
|
|
2399
|
+
"include": "#parentheses-common"
|
|
2400
|
+
}
|
|
2401
|
+
]
|
|
2402
|
+
},
|
|
2277
2403
|
"function-definition": {
|
|
2278
2404
|
"begin": "(?i)(?=([^\\n!\"':;](?!\\bend)(?!\\bsubroutine\\b))*\\bfunction\\b)",
|
|
2279
2405
|
"end": "(?=[\\n!;])",
|
|
@@ -2662,7 +2788,7 @@
|
|
|
2662
2788
|
"patterns": [
|
|
2663
2789
|
{
|
|
2664
2790
|
"begin": "(?!(\\s*([\\n!;])))",
|
|
2665
|
-
"end": "(?=[\\n!;])",
|
|
2791
|
+
"end": "\\s*(?=[\\n!;])",
|
|
2666
2792
|
"patterns": [
|
|
2667
2793
|
{
|
|
2668
2794
|
"captures": {
|
|
@@ -2673,7 +2799,7 @@
|
|
|
2673
2799
|
"name": "invalid.error.label.else.fortran"
|
|
2674
2800
|
}
|
|
2675
2801
|
},
|
|
2676
|
-
"match": "\\s*([a-z]\\w*)?\\s*\\b(\\w*)\\b"
|
|
2802
|
+
"match": "(?i)\\s*([a-z]\\w*)?\\s*\\b(\\w*)\\b"
|
|
2677
2803
|
},
|
|
2678
2804
|
{
|
|
2679
2805
|
"include": "#invalid-word"
|
|
@@ -3785,19 +3911,26 @@
|
|
|
3785
3911
|
},
|
|
3786
3912
|
"patterns": [
|
|
3787
3913
|
{
|
|
3788
|
-
"include": "#
|
|
3914
|
+
"include": "#array-constructor"
|
|
3789
3915
|
},
|
|
3790
3916
|
{
|
|
3791
|
-
"include": "#
|
|
3917
|
+
"include": "#parentheses"
|
|
3792
3918
|
},
|
|
3793
3919
|
{
|
|
3794
|
-
"include": "#
|
|
3920
|
+
"include": "#parentheses-common"
|
|
3921
|
+
}
|
|
3922
|
+
]
|
|
3923
|
+
},
|
|
3924
|
+
"parentheses-common": {
|
|
3925
|
+
"patterns": [
|
|
3926
|
+
{
|
|
3927
|
+
"include": "#comments"
|
|
3795
3928
|
},
|
|
3796
3929
|
{
|
|
3797
|
-
"include": "#
|
|
3930
|
+
"include": "#constants"
|
|
3798
3931
|
},
|
|
3799
3932
|
{
|
|
3800
|
-
"include": "#
|
|
3933
|
+
"include": "#operators"
|
|
3801
3934
|
},
|
|
3802
3935
|
{
|
|
3803
3936
|
"include": "#intrinsic-functions"
|
|
@@ -3824,15 +3957,6 @@
|
|
|
3824
3957
|
{
|
|
3825
3958
|
"include": "#procedure-call-dummy-variable"
|
|
3826
3959
|
},
|
|
3827
|
-
{
|
|
3828
|
-
"include": "#comments"
|
|
3829
|
-
},
|
|
3830
|
-
{
|
|
3831
|
-
"include": "#constants"
|
|
3832
|
-
},
|
|
3833
|
-
{
|
|
3834
|
-
"include": "#operators"
|
|
3835
|
-
},
|
|
3836
3960
|
{
|
|
3837
3961
|
"include": "#array-constructor"
|
|
3838
3962
|
},
|
|
@@ -3840,10 +3964,7 @@
|
|
|
3840
3964
|
"include": "#parentheses"
|
|
3841
3965
|
},
|
|
3842
3966
|
{
|
|
3843
|
-
"include": "#
|
|
3844
|
-
},
|
|
3845
|
-
{
|
|
3846
|
-
"include": "#variable"
|
|
3967
|
+
"include": "#parentheses-common"
|
|
3847
3968
|
}
|
|
3848
3969
|
]
|
|
3849
3970
|
},
|
|
@@ -5547,11 +5668,19 @@
|
|
|
5547
5668
|
"name": "keyword.control.elsewhere.fortran"
|
|
5548
5669
|
}
|
|
5549
5670
|
},
|
|
5550
|
-
"end": "(?=[\\n!;])",
|
|
5671
|
+
"end": "\\s*(?=[\\n!;])",
|
|
5551
5672
|
"patterns": [
|
|
5552
5673
|
{
|
|
5553
5674
|
"include": "#parentheses"
|
|
5554
5675
|
},
|
|
5676
|
+
{
|
|
5677
|
+
"captures": {
|
|
5678
|
+
"1": {
|
|
5679
|
+
"name": "meta.label.elsewhere.fortran"
|
|
5680
|
+
}
|
|
5681
|
+
},
|
|
5682
|
+
"match": "(?i)(\\s*[a-z]\\w*)?"
|
|
5683
|
+
},
|
|
5555
5684
|
{
|
|
5556
5685
|
"include": "#invalid-word"
|
|
5557
5686
|
}
|