@willbooster/tree-sitter-c-sharp 1.0.11 → 1.0.12

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 CHANGED
@@ -1205,7 +1205,9 @@ module.exports = grammar({
1205
1205
 
1206
1206
  assignment_expression: ($) =>
1207
1207
  seq(
1208
- field('left', $.lvalue_expression),
1208
+ // An invocation can return a reference (`Unsafe.Add(ref x, i) = v`). It ends with `)`, so `=` after it adds few
1209
+ // parse states, unlike making any expression assignable.
1210
+ field('left', choice($.lvalue_expression, $.invocation_expression)),
1209
1211
  field('operator', choice('=', '+=', '-=', '*=', '/=', '%=', '&=', '^=', '|=', '<<=', '>>=', '>>>=', '??=')),
1210
1212
  field('right', $.expression)
1211
1213
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-c-sharp",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "C# grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -1006,6 +1006,10 @@
1006
1006
  "multiple": false,
1007
1007
  "required": true,
1008
1008
  "types": [
1009
+ {
1010
+ "type": "invocation_expression",
1011
+ "named": true
1012
+ },
1009
1013
  {
1010
1014
  "type": "lvalue_expression",
1011
1015
  "named": true
Binary file
package/tree-sitter.json CHANGED
@@ -19,7 +19,7 @@
19
19
  }
20
20
  ],
21
21
  "metadata": {
22
- "version": "1.0.11",
22
+ "version": "1.0.12",
23
23
  "license": "MIT",
24
24
  "description": "C# grammar for tree-sitter",
25
25
  "authors": [