tm-grammars 1.6.10 → 1.7.0

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.
@@ -441,6 +441,17 @@
441
441
  },
442
442
  "match": "(axisFormat)\\s+([\\w\\%\\/\\\\\\-\\.]+)"
443
443
  },
444
+ {
445
+ "captures": {
446
+ "1": {
447
+ "name": "keyword.control.mermaid"
448
+ },
449
+ "2": {
450
+ "name": "string"
451
+ }
452
+ },
453
+ "match": "(tickInterval)\\s+(([1-9][0-9]*)(millisecond|second|minute|hour|day|week|month))"
454
+ },
444
455
  {
445
456
  "captures": {
446
457
  "1": {
@@ -671,6 +682,27 @@
671
682
  "match": "\\%%.*",
672
683
  "name": "comment"
673
684
  },
685
+ {
686
+ "captures": {
687
+ "1": {
688
+ "name": "keyword.control.mermaid"
689
+ },
690
+ "2": {
691
+ "name": "variable"
692
+ },
693
+ "3": {
694
+ "name": "keyword.control.mermaid"
695
+ },
696
+ "4": {
697
+ "name": "string"
698
+ },
699
+ "5": {
700
+ "name": "keyword.control.mermaid"
701
+ }
702
+ },
703
+ "comment": "",
704
+ "match": "\\b(subgraph)\\s+(\\w+)(\\[)(\"?[\\w\\s*+%=\\\\/:\\.\\-'`,&^#$!?<>]*\"?)(\\])"
705
+ },
674
706
  {
675
707
  "captures": {
676
708
  "1": {
@@ -680,7 +712,7 @@
680
712
  "name": "entity.name.function.mermaid"
681
713
  }
682
714
  },
683
- "match": "\\b(subgraph)\\s+([\\p{Letter}\\ 0-9]+)",
715
+ "match": "\\b(subgraph)\\s+([\\p{Letter}\\ 0-9<>]+)",
684
716
  "name": "meta.function.mermaid"
685
717
  },
686
718
  {
@@ -832,7 +864,7 @@
832
864
  }
833
865
  },
834
866
  "comment": "(Graph Link Start Arrow)(Text)(Graph Link End Arrow)",
835
- "match": "\\s*([xo<]?(?:-{2,5}|={2,5}|-\\.{1,3}|-\\.))((?:(?!--|==)[\\w\\s*+%=\\\\/:\\.\\-'`,\"&^#$!?])*)((?:-{2,5}|={2,5}|\\.{1,3}-|\\.-)[xo>]?)"
867
+ "match": "\\s*([xo<]?(?:-{2,5}|={2,5}|-\\.{1,3}|-\\.))((?:(?!--|==)[\\w\\s*+%=\\\\/:\\.\\-'`,\"&^#$!?<>\\[\\]])*)((?:-{2,5}|={2,5}|\\.{1,3}-|\\.-)[xo>]?)"
836
868
  },
837
869
  {
838
870
  "captures": {
@@ -943,6 +975,182 @@
943
975
  }
944
976
  ]
945
977
  },
978
+ {
979
+ "begin": "^\\s*(requirementDiagram)",
980
+ "beginCaptures": {
981
+ "1": {
982
+ "name": "keyword.control.mermaid"
983
+ }
984
+ },
985
+ "comment": "Requirement Diagram",
986
+ "end": "(^|\\G)(?=\\s*[`:~]{3,}\\s*$)",
987
+ "patterns": [
988
+ {
989
+ "match": "\\%%.*",
990
+ "name": "comment"
991
+ },
992
+ {
993
+ "begin": "^\\s*((?i)(?:functional|interface|performance|physical)?requirement|designConstraint)\\s*([\"\\(\\)$&%\\^/#.,?!;:*+=<>\\'\\\\\\-\\w\\s]*)\\s*({)",
994
+ "beginCaptures": {
995
+ "1": {
996
+ "name": "keyword.control.mermaid"
997
+ },
998
+ "2": {
999
+ "name": "variable"
1000
+ },
1001
+ "3": {
1002
+ "name": "keyword.control.mermaid"
1003
+ }
1004
+ },
1005
+ "comment": "(requirement) (name) ({)",
1006
+ "end": "\\s*(})",
1007
+ "endCaptures": {
1008
+ "1": {
1009
+ "name": "keyword.control.mermaid"
1010
+ }
1011
+ },
1012
+ "patterns": [
1013
+ {
1014
+ "captures": {
1015
+ "1": {
1016
+ "name": "keyword.control.mermaid"
1017
+ },
1018
+ "2": {
1019
+ "name": "variable"
1020
+ }
1021
+ },
1022
+ "comment": "(id:) (variable id)",
1023
+ "match": "\\s*(id:)\\s*([$&%\\^/#.,?!;:*+<>_\\'\\\\\\w\\s]+)"
1024
+ },
1025
+ {
1026
+ "captures": {
1027
+ "1": {
1028
+ "name": "keyword.control.mermaid"
1029
+ },
1030
+ "2": {
1031
+ "name": "string"
1032
+ }
1033
+ },
1034
+ "comment": "(text:) (text string)",
1035
+ "match": "\\s*(text:)\\s*([$&%\\^/#.,?!;:*+<>_\\'\\\\\\w\\s]+)"
1036
+ },
1037
+ {
1038
+ "captures": {
1039
+ "1": {
1040
+ "name": "keyword.control.mermaid"
1041
+ },
1042
+ "2": {
1043
+ "name": "entity.name.function.mermaid"
1044
+ }
1045
+ },
1046
+ "comment": "(risk:) (risk option)",
1047
+ "match": "\\s*(risk:)\\s*(low|medium|high)\\s*$"
1048
+ },
1049
+ {
1050
+ "captures": {
1051
+ "1": {
1052
+ "name": "keyword.control.mermaid"
1053
+ },
1054
+ "2": {
1055
+ "name": "entity.name.function.mermaid"
1056
+ }
1057
+ },
1058
+ "comment": "(verifyMethod)(:) (method)",
1059
+ "match": "\\s*(verifymethod:)\\s*(analysis|inspection|test|demonstration)\\s*$"
1060
+ }
1061
+ ]
1062
+ },
1063
+ {
1064
+ "begin": "^\\s*(element)\\s*([\"\\(\\)$&%\\^/#.,?!;:*+=<>\\'\\\\\\-\\w\\s]*)\\s*({)",
1065
+ "beginCaptures": {
1066
+ "1": {
1067
+ "name": "keyword.control.mermaid"
1068
+ },
1069
+ "2": {
1070
+ "name": "variable"
1071
+ },
1072
+ "3": {
1073
+ "name": "keyword.control.mermaid"
1074
+ }
1075
+ },
1076
+ "comment": "(element) (name) ({)",
1077
+ "end": "\\s*(})",
1078
+ "endCaptures": {
1079
+ "1": {
1080
+ "name": "keyword.control.mermaid"
1081
+ }
1082
+ },
1083
+ "patterns": [
1084
+ {
1085
+ "captures": {
1086
+ "1": {
1087
+ "name": "keyword.control.mermaid"
1088
+ },
1089
+ "2": {
1090
+ "name": "variable"
1091
+ }
1092
+ },
1093
+ "comment": "(type:) (user type)",
1094
+ "match": "\\s*(type:)\\s*([\"$&%\\^/#.,?!;:*+<>_\\'\\\\\\w\\s]+)"
1095
+ },
1096
+ {
1097
+ "captures": {
1098
+ "1": {
1099
+ "name": "keyword.control.mermaid"
1100
+ },
1101
+ "2": {
1102
+ "name": "variable"
1103
+ }
1104
+ },
1105
+ "comment": "(docref:) (user ref)",
1106
+ "match": "\\s*(?i)(docref:)\\s*([$&%\\^/#.,?!;:*+<>_\\'\\\\\\w\\s]+)"
1107
+ }
1108
+ ]
1109
+ },
1110
+ {
1111
+ "captures": {
1112
+ "1": {
1113
+ "name": "variable"
1114
+ },
1115
+ "2": {
1116
+ "name": "keyword.control.mermaid"
1117
+ },
1118
+ "3": {
1119
+ "name": "keyword.control.mermaid"
1120
+ },
1121
+ "4": {
1122
+ "name": "keyword.control.mermaid"
1123
+ },
1124
+ "5": {
1125
+ "name": "variable"
1126
+ }
1127
+ },
1128
+ "comment": "(source) (-) (type) (->) (destination)",
1129
+ "match": "^\\s*([\\w]+)\\s*(-)\\s*((?i)contains|copies|derives|satisfies|verifies|refines|traces)\\s*(->)\\s*([\\w]+)\\s*$"
1130
+ },
1131
+ {
1132
+ "captures": {
1133
+ "1": {
1134
+ "name": "variable"
1135
+ },
1136
+ "2": {
1137
+ "name": "keyword.control.mermaid"
1138
+ },
1139
+ "3": {
1140
+ "name": "keyword.control.mermaid"
1141
+ },
1142
+ "4": {
1143
+ "name": "keyword.control.mermaid"
1144
+ },
1145
+ "5": {
1146
+ "name": "variable"
1147
+ }
1148
+ },
1149
+ "comment": "(destination) (<-) (type) (-) (source)",
1150
+ "match": "^\\s*([\\w]+)\\s*(<-)\\s*((?i)contains|copies|derives|satisfies|verifies|refines|traces)\\s*(-)\\s*([\\w]+)\\s*$"
1151
+ }
1152
+ ]
1153
+ },
946
1154
  {
947
1155
  "begin": "^\\s*(sequenceDiagram)",
948
1156
  "beginCaptures": {
@@ -1082,6 +1290,33 @@
1082
1290
  },
1083
1291
  "comment": "(Actor)(Arrow)(Actor)(:)(Message)",
1084
1292
  "match": "\\s*(\\b[\"()$&%^/#.?!*=<>'\\\\\\w\\s]+\\b\\)?)\\s*(-?-(?:\\>|x|\\))\\>?[+-]?)\\s*([\"()$&%^/#.?!*=<>'\\\\\\w\\s]+\\b\\)?)\\s*(:)\\s*([^;#]*)"
1293
+ },
1294
+ {
1295
+ "captures": {
1296
+ "1": {
1297
+ "name": "keyword.control.mermaid"
1298
+ },
1299
+ "2": {
1300
+ "name": "entity.name.function.mermaid"
1301
+ },
1302
+ "3": {
1303
+ "name": "string"
1304
+ }
1305
+ },
1306
+ "comment": "(box transparent text)",
1307
+ "match": "\\s*(box)\\s+(transparent)(?:\\s+([^;#]*))?"
1308
+ },
1309
+ {
1310
+ "captures": {
1311
+ "1": {
1312
+ "name": "keyword.control.mermaid"
1313
+ },
1314
+ "2": {
1315
+ "name": "string"
1316
+ }
1317
+ },
1318
+ "comment": "(box text)",
1319
+ "match": "\\s*(box)(?:\\s+([^;#]*))?"
1085
1320
  }
1086
1321
  ]
1087
1322
  },
@@ -1352,7 +1587,8 @@
1352
1587
  ]
1353
1588
  },
1354
1589
  "mermaid-ado-code-block": {
1355
- "begin": "\\s*:::\\s*mermaid\\s*$",
1590
+ "begin": "(?i)\\s*:::\\s*mermaid\\s*$",
1591
+ "contentName": "meta.embedded.block.mermaid",
1356
1592
  "end": "\\s*:::\\s*",
1357
1593
  "patterns": [
1358
1594
  {
@@ -1361,7 +1597,8 @@
1361
1597
  ]
1362
1598
  },
1363
1599
  "mermaid-code-block": {
1364
- "begin": "(?<=[`~])mermaid(\\s+[^`~]*)?$",
1600
+ "begin": "(?i)(?<=[`~])mermaid(\\s+[^`~]*)?$",
1601
+ "contentName": "meta.embedded.block.mermaid",
1365
1602
  "end": "(^|\\G)(?=\\s*[`~]{3,}\\s*$)",
1366
1603
  "patterns": [
1367
1604
  {
@@ -1370,7 +1607,8 @@
1370
1607
  ]
1371
1608
  },
1372
1609
  "mermaid-code-block-with-attributes": {
1373
- "begin": "(?<=[`~])\\{\\s*\\.?mermaid(\\s+[^`~]*)?$",
1610
+ "begin": "(?i)(?<=[`~])\\{\\s*\\.?mermaid(\\s+[^`~]*)?$",
1611
+ "contentName": "meta.embedded.block.mermaid",
1374
1612
  "end": "(^|\\G)(?=\\s*[`~]{3,}\\s*$)",
1375
1613
  "patterns": [
1376
1614
  {
@@ -0,0 +1,230 @@
1
+ {
2
+ "displayName": "Gettext PO",
3
+ "fileTypes": [
4
+ "po",
5
+ "pot",
6
+ "potx"
7
+ ],
8
+ "name": "po",
9
+ "patterns": [
10
+ {
11
+ "begin": "^(?=(msgid(_plural)?|msgctxt)\\s*\"[^\"])|^\\s*$",
12
+ "comment": "Start of body of document, after header",
13
+ "end": "\\z",
14
+ "patterns": [
15
+ {
16
+ "include": "#body"
17
+ }
18
+ ]
19
+ },
20
+ {
21
+ "include": "#comments"
22
+ },
23
+ {
24
+ "match": "^msg(id|str)\\s+\"\"\\s*$\\n?",
25
+ "name": "comment.line.number-sign.po"
26
+ },
27
+ {
28
+ "captures": {
29
+ "1": {
30
+ "name": "constant.language.po"
31
+ },
32
+ "2": {
33
+ "name": "punctuation.separator.key-value.po"
34
+ },
35
+ "3": {
36
+ "name": "string.other.po"
37
+ }
38
+ },
39
+ "match": "^\"(?:([^\\s:]+)(:)\\s+)?([^\"]*)\"\\s*$\\n?",
40
+ "name": "meta.header.po"
41
+ }
42
+ ],
43
+ "repository": {
44
+ "body": {
45
+ "patterns": [
46
+ {
47
+ "begin": "^(msgid(_plural)?)\\s+",
48
+ "beginCaptures": {
49
+ "1": {
50
+ "name": "keyword.control.msgid.po"
51
+ }
52
+ },
53
+ "end": "^(?!\")",
54
+ "name": "meta.scope.msgid.po",
55
+ "patterns": [
56
+ {
57
+ "begin": "(\\G|^)\"",
58
+ "end": "\"",
59
+ "name": "string.quoted.double.po",
60
+ "patterns": [
61
+ {
62
+ "match": "\\\\[\\\\\"]",
63
+ "name": "constant.character.escape.po"
64
+ }
65
+ ]
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "begin": "^(msgstr)(?:(\\[)(\\d+)(\\]))?\\s+",
71
+ "beginCaptures": {
72
+ "1": {
73
+ "name": "keyword.control.msgstr.po"
74
+ },
75
+ "2": {
76
+ "name": "keyword.control.msgstr.po"
77
+ },
78
+ "3": {
79
+ "name": "constant.numeric.po"
80
+ },
81
+ "4": {
82
+ "name": "keyword.control.msgstr.po"
83
+ }
84
+ },
85
+ "end": "^(?!\")",
86
+ "name": "meta.scope.msgstr.po",
87
+ "patterns": [
88
+ {
89
+ "begin": "(\\G|^)\"",
90
+ "end": "\"",
91
+ "name": "string.quoted.double.po",
92
+ "patterns": [
93
+ {
94
+ "match": "\\\\[\\\\\"]",
95
+ "name": "constant.character.escape.po"
96
+ }
97
+ ]
98
+ }
99
+ ]
100
+ },
101
+ {
102
+ "begin": "^(msgctxt)(?:(\\[)(\\d+)(\\]))?\\s+",
103
+ "beginCaptures": {
104
+ "1": {
105
+ "name": "keyword.control.msgctxt.po"
106
+ },
107
+ "2": {
108
+ "name": "keyword.control.msgctxt.po"
109
+ },
110
+ "3": {
111
+ "name": "constant.numeric.po"
112
+ },
113
+ "4": {
114
+ "name": "keyword.control.msgctxt.po"
115
+ }
116
+ },
117
+ "end": "^(?!\")",
118
+ "name": "meta.scope.msgctxt.po",
119
+ "patterns": [
120
+ {
121
+ "begin": "(\\G|^)\"",
122
+ "end": "\"",
123
+ "name": "string.quoted.double.po",
124
+ "patterns": [
125
+ {
126
+ "match": "\\\\[\\\\\"]",
127
+ "name": "constant.character.escape.po"
128
+ }
129
+ ]
130
+ }
131
+ ]
132
+ },
133
+ {
134
+ "captures": {
135
+ "1": {
136
+ "name": "punctuation.definition.comment.po"
137
+ }
138
+ },
139
+ "match": "^(#~).*$\\n?",
140
+ "name": "comment.line.number-sign.obsolete.po"
141
+ },
142
+ {
143
+ "include": "#comments"
144
+ },
145
+ {
146
+ "comment": "a line that does not begin with # or \". Could improve this regexp",
147
+ "match": "^(?!\\s*$)[^#\"].*$\\n?",
148
+ "name": "invalid.illegal.po"
149
+ }
150
+ ]
151
+ },
152
+ "comments": {
153
+ "patterns": [
154
+ {
155
+ "begin": "^(?=#)",
156
+ "end": "(?!\\G)",
157
+ "patterns": [
158
+ {
159
+ "begin": "(#,)\\s+",
160
+ "beginCaptures": {
161
+ "1": {
162
+ "name": "punctuation.definition.comment.po"
163
+ }
164
+ },
165
+ "end": "\\n",
166
+ "name": "comment.line.number-sign.flag.po",
167
+ "patterns": [
168
+ {
169
+ "captures": {
170
+ "1": {
171
+ "name": "entity.name.type.flag.po"
172
+ }
173
+ },
174
+ "match": "(?:\\G|,\\s*)((?:fuzzy)|(?:no-)?(?:c|objc|sh|lisp|elisp|librep|scheme|smalltalk|java|csharp|awk|object-pascal|ycp|tcl|perl|perl-brace|php|gcc-internal|qt|boost)-format)"
175
+ }
176
+ ]
177
+ },
178
+ {
179
+ "begin": "#\\.",
180
+ "beginCaptures": {
181
+ "0": {
182
+ "name": "punctuation.definition.comment.po"
183
+ }
184
+ },
185
+ "end": "\\n",
186
+ "name": "comment.line.number-sign.extracted.po"
187
+ },
188
+ {
189
+ "begin": "(#:)[ \\t]*",
190
+ "beginCaptures": {
191
+ "1": {
192
+ "name": "punctuation.definition.comment.po"
193
+ }
194
+ },
195
+ "end": "\\n",
196
+ "name": "comment.line.number-sign.reference.po",
197
+ "patterns": [
198
+ {
199
+ "match": "(\\S+:)([\\d;]*)",
200
+ "name": "storage.type.class.po"
201
+ }
202
+ ]
203
+ },
204
+ {
205
+ "begin": "#\\|",
206
+ "beginCaptures": {
207
+ "0": {
208
+ "name": "punctuation.definition.comment.po"
209
+ }
210
+ },
211
+ "end": "\\n",
212
+ "name": "comment.line.number-sign.previous.po"
213
+ },
214
+ {
215
+ "begin": "#",
216
+ "beginCaptures": {
217
+ "0": {
218
+ "name": "punctuation.definition.comment.po"
219
+ }
220
+ },
221
+ "end": "\\n",
222
+ "name": "comment.line.number-sign.po"
223
+ }
224
+ ]
225
+ }
226
+ ]
227
+ }
228
+ },
229
+ "scopeName": "source.po"
230
+ }