@willbooster/tree-sitter-c 5.0.6 → 5.1.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/grammar.js +13 -0
- package/package.json +1 -1
- package/queries/highlights.scm +1 -0
- package/src/node-types.json +34 -0
- package/tree-sitter-c.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -1048,6 +1048,7 @@ module.exports = Object.assign(
|
|
|
1048
1048
|
$.cast_expression,
|
|
1049
1049
|
$.pointer_expression,
|
|
1050
1050
|
$.sizeof_expression,
|
|
1051
|
+
$.countof_expression,
|
|
1051
1052
|
$.alignof_expression,
|
|
1052
1053
|
$.offsetof_expression,
|
|
1053
1054
|
$.va_arg_expression,
|
|
@@ -1153,6 +1154,18 @@ module.exports = Object.assign(
|
|
|
1153
1154
|
)
|
|
1154
1155
|
),
|
|
1155
1156
|
|
|
1157
|
+
countof_expression: ($) =>
|
|
1158
|
+
prec(
|
|
1159
|
+
PREC.SIZEOF,
|
|
1160
|
+
seq(
|
|
1161
|
+
'_Countof',
|
|
1162
|
+
choice(
|
|
1163
|
+
field('value', prec.dynamic(3, $.expression)),
|
|
1164
|
+
prec.dynamic(2, seq('(', field('type', $.type_descriptor), ')'))
|
|
1165
|
+
)
|
|
1166
|
+
)
|
|
1167
|
+
),
|
|
1168
|
+
|
|
1156
1169
|
alignof_expression: ($) =>
|
|
1157
1170
|
prec.dynamic(
|
|
1158
1171
|
2,
|
package/package.json
CHANGED
package/queries/highlights.scm
CHANGED
package/src/node-types.json
CHANGED
|
@@ -159,6 +159,10 @@
|
|
|
159
159
|
"type": "conditional_expression",
|
|
160
160
|
"named": true
|
|
161
161
|
},
|
|
162
|
+
{
|
|
163
|
+
"type": "countof_expression",
|
|
164
|
+
"named": true
|
|
165
|
+
},
|
|
162
166
|
{
|
|
163
167
|
"type": "extension_expression",
|
|
164
168
|
"named": true
|
|
@@ -1288,6 +1292,32 @@
|
|
|
1288
1292
|
"named": true,
|
|
1289
1293
|
"fields": {}
|
|
1290
1294
|
},
|
|
1295
|
+
{
|
|
1296
|
+
"type": "countof_expression",
|
|
1297
|
+
"named": true,
|
|
1298
|
+
"fields": {
|
|
1299
|
+
"type": {
|
|
1300
|
+
"multiple": false,
|
|
1301
|
+
"required": false,
|
|
1302
|
+
"types": [
|
|
1303
|
+
{
|
|
1304
|
+
"type": "type_descriptor",
|
|
1305
|
+
"named": true
|
|
1306
|
+
}
|
|
1307
|
+
]
|
|
1308
|
+
},
|
|
1309
|
+
"value": {
|
|
1310
|
+
"multiple": false,
|
|
1311
|
+
"required": false,
|
|
1312
|
+
"types": [
|
|
1313
|
+
{
|
|
1314
|
+
"type": "expression",
|
|
1315
|
+
"named": true
|
|
1316
|
+
}
|
|
1317
|
+
]
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
},
|
|
1291
1321
|
{
|
|
1292
1322
|
"type": "declaration",
|
|
1293
1323
|
"named": true,
|
|
@@ -4577,6 +4607,10 @@
|
|
|
4577
4607
|
"type": "_Complex",
|
|
4578
4608
|
"named": false
|
|
4579
4609
|
},
|
|
4610
|
+
{
|
|
4611
|
+
"type": "_Countof",
|
|
4612
|
+
"named": false
|
|
4613
|
+
},
|
|
4580
4614
|
{
|
|
4581
4615
|
"type": "_Generic",
|
|
4582
4616
|
"named": false
|
package/tree-sitter-c.wasm
CHANGED
|
Binary file
|