tm-grammars 1.25.3 → 1.27.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.
package/grammars/nix.json CHANGED
@@ -453,6 +453,9 @@
453
453
  {
454
454
  "include": "#operator-unary"
455
455
  },
456
+ {
457
+ "include": "#operator-binary"
458
+ },
456
459
  {
457
460
  "include": "#constants"
458
461
  },
@@ -493,8 +496,7 @@
493
496
  "include": "#attrset-or-function"
494
497
  },
495
498
  {
496
- "match": "(\\bor\\b|\\.|\\|>|<\\||==|!=?|<=?|>=?|&&|\\|\\||->|//|\\?|\\+\\+|[-*]|/(?=([^*]|$))|\\+)",
497
- "name": "keyword.operator.nix"
499
+ "include": "#operator-binary"
498
500
  },
499
501
  {
500
502
  "include": "#constants"
@@ -975,6 +977,10 @@
975
977
  }
976
978
  ]
977
979
  },
980
+ "operator-binary": {
981
+ "match": "(\\bor\\b|\\.|\\|>|<\\||==|!=?|<=?|>=?|&&|\\|\\||->|//|\\?|\\+\\+|[-*]|/(?=([^*]|$))|\\+)",
982
+ "name": "keyword.operator.nix"
983
+ },
978
984
  "operator-unary": {
979
985
  "match": "([-!])",
980
986
  "name": "keyword.operator.unary.nix"
@@ -0,0 +1,151 @@
1
+ {
2
+ "displayName": "OpenSCAD",
3
+ "fileTypes": [
4
+ "scad"
5
+ ],
6
+ "foldingStartMarker": "/\\*\\*|\\{\\s*$",
7
+ "foldingStopMarker": "\\*\\*/|^\\s*}",
8
+ "name": "openscad",
9
+ "patterns": [
10
+ {
11
+ "captures": {
12
+ "1": {
13
+ "name": "keyword.control.scad"
14
+ }
15
+ },
16
+ "match": "^(module)\\s.*$",
17
+ "name": "meta.function.scad"
18
+ },
19
+ {
20
+ "match": "\\b(if|else|for|intersection_for|assign|render|function|include|use)\\b",
21
+ "name": "keyword.control.scad"
22
+ },
23
+ {
24
+ "begin": "/\\*\\*(?!/)",
25
+ "captures": {
26
+ "0": {
27
+ "name": "punctuation.definition.comment.scad"
28
+ }
29
+ },
30
+ "end": "\\*/",
31
+ "name": "comment.block.documentation.scad"
32
+ },
33
+ {
34
+ "begin": "/\\*",
35
+ "captures": {
36
+ "0": {
37
+ "name": "punctuation.definition.comment.scad"
38
+ }
39
+ },
40
+ "end": "\\*/",
41
+ "name": "comment.block.scad"
42
+ },
43
+ {
44
+ "captures": {
45
+ "1": {
46
+ "name": "punctuation.definition.comment.scad"
47
+ }
48
+ },
49
+ "match": "(//).*$\\n?",
50
+ "name": "comment.line.double-slash.scad"
51
+ },
52
+ {
53
+ "begin": "\"",
54
+ "end": "\"",
55
+ "name": "string.quoted.double.scad",
56
+ "patterns": [
57
+ {
58
+ "match": "\\\\.",
59
+ "name": "constant.character.escape.scad"
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ "begin": "'",
65
+ "beginCaptures": {
66
+ "0": {
67
+ "name": "punctuation.definition.string.begin.scad"
68
+ }
69
+ },
70
+ "end": "'",
71
+ "endCaptures": {
72
+ "0": {
73
+ "name": "punctuation.definition.string.end.scad"
74
+ }
75
+ },
76
+ "name": "string.quoted.single.scad",
77
+ "patterns": [
78
+ {
79
+ "match": "\\\\(x\\h{2}|[012][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)",
80
+ "name": "constant.character.escape.scad"
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ "begin": "\"",
86
+ "beginCaptures": {
87
+ "0": {
88
+ "name": "punctuation.definition.string.begin.scad"
89
+ }
90
+ },
91
+ "end": "\"",
92
+ "endCaptures": {
93
+ "0": {
94
+ "name": "punctuation.definition.string.end.scad"
95
+ }
96
+ },
97
+ "name": "string.quoted.double.scad",
98
+ "patterns": [
99
+ {
100
+ "match": "\\\\(x\\h{2}|[012][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)",
101
+ "name": "constant.character.escape.scad"
102
+ }
103
+ ]
104
+ },
105
+ {
106
+ "match": "\\b(abs|acos|asun|atan2??|ceil|cos|exp|floor|ln|log|lookup|max|min|pow|rands|round|sign|sin|sqrt|tan|str|cube|sphere|cylinder|polyhedron|scale|rotate|translate|mirror|multimatrix|color|minkowski|hull|union|difference|intersection|echo)\\b",
107
+ "name": "support.function.scad"
108
+ },
109
+ {
110
+ "match": ";",
111
+ "name": "punctuation.terminator.statement.scad"
112
+ },
113
+ {
114
+ "match": ",[\\t |]*",
115
+ "name": "meta.delimiter.object.comma.scad"
116
+ },
117
+ {
118
+ "match": "\\.",
119
+ "name": "meta.delimiter.method.period.scad"
120
+ },
121
+ {
122
+ "match": "[{}]",
123
+ "name": "meta.brace.curly.scad"
124
+ },
125
+ {
126
+ "match": "[()]",
127
+ "name": "meta.brace.round.scad"
128
+ },
129
+ {
130
+ "match": "[]\\[]",
131
+ "name": "meta.brace.square.scad"
132
+ },
133
+ {
134
+ "match": "[!$%\\&*]|--?|\\+\\+|[+~]|===?|=|!==??|<=|>=|<<=|>>=|>>>=|<>|[!<>]|&&|\\|\\||\\?:|\\*=|(?<!\\()/=|%=|\\+=|-=|&=|\\^=|\\b(in|instanceof|new|delete|typeof|void)\\b",
135
+ "name": "keyword.operator.scad"
136
+ },
137
+ {
138
+ "match": "\\b((0([Xx])\\h+)|([0-9]+(\\.[0-9]+)?))\\b",
139
+ "name": "constant.numeric.scad"
140
+ },
141
+ {
142
+ "match": "\\btrue\\b",
143
+ "name": "constant.language.boolean.true.scad"
144
+ },
145
+ {
146
+ "match": "\\bfalse\\b",
147
+ "name": "constant.language.boolean.false.scad"
148
+ }
149
+ ],
150
+ "scopeName": "source.scad"
151
+ }
@@ -71,7 +71,7 @@
71
71
  "include": "#comments"
72
72
  },
73
73
  {
74
- "begin": "([A-Za-z][0-9A-Z_a-z]*)\\s*(=)\\s*(0[Xx]\\h+|[0-9]+)",
74
+ "begin": "([A-Za-z][0-9A-Z_a-z]*)\\s*(=)\\s*(-?0[Xx]\\h+|-?[0-9]+)",
75
75
  "beginCaptures": {
76
76
  "1": {
77
77
  "name": "variable.other.proto"
@@ -98,7 +98,7 @@
98
98
  ]
99
99
  },
100
100
  "field": {
101
- "begin": "\\s*(optional|repeated|required)?\\s*\\b([.\\w]+)\\s+(\\w+)\\s*(=)\\s*(0[Xx]\\h+|[0-9]+)",
101
+ "begin": "\\s*(optional|repeated|required)?\\s*(\\.?[.\\w]+)\\s+(\\w+)\\s*(=)\\s*(0[Xx]\\h+|[0-9]+)",
102
102
  "beginCaptures": {
103
103
  "1": {
104
104
  "name": "storage.modifier.proto"
@@ -150,7 +150,7 @@
150
150
  ]
151
151
  },
152
152
  "ident": {
153
- "match": "[A-Za-z][0-9A-Z_a-z]*",
153
+ "match": "\\.?[A-Za-z][.0-9A-Z_a-z]*",
154
154
  "name": "entity.name.class.proto"
155
155
  },
156
156
  "import": {
@@ -202,7 +202,7 @@
202
202
  ]
203
203
  },
204
204
  "mapfield": {
205
- "begin": "\\s*(map)\\s*(<)\\s*([.\\w]+)\\s*,\\s*([.\\w]+)\\s*(>)\\s+(\\w+)\\s*(=)\\s*(\\d+)",
205
+ "begin": "\\s*(map)\\s*(<)\\s*(\\.?[.\\w]+)\\s*,\\s*(\\.?[.\\w]+)\\s*(>)\\s+(\\w+)\\s*(=)\\s*(\\d+)",
206
206
  "beginCaptures": {
207
207
  "1": {
208
208
  "name": "storage.type.proto"
@@ -470,7 +470,7 @@
470
470
  "name": "storage.type.proto"
471
471
  },
472
472
  "string": {
473
- "match": "('(['[^']])*')|(\"([\"[^\"]])*\")",
473
+ "match": "([\"'])(?:\\\\.|[^\\\\])*?\\1",
474
474
  "name": "string.quoted.double.proto"
475
475
  },
476
476
  "subMsgOption": {