@willbooster/tree-sitter-c-sharp 1.0.17 → 1.0.18

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
@@ -52,7 +52,6 @@ module.exports = grammar({
52
52
 
53
53
  [$.tuple_element, $.type_pattern],
54
54
  [$.tuple_element, $.using_variable_declarator],
55
- [$.tuple_element, $.declaration_expression],
56
55
 
57
56
  [$.tuple_pattern, $.parameter],
58
57
  [$.tuple_pattern, $._simple_name],
@@ -660,8 +659,7 @@ module.exports = grammar({
660
659
  1,
661
660
  seq(
662
661
  optional(seq(field('name', $.identifier), ':')),
663
- optional(choice('ref', 'out', 'in')),
664
- choice($.expression, $.declaration_expression)
662
+ choice(seq(optional(choice('ref', 'out', 'in')), $.expression), seq('out', $.declaration_expression))
665
663
  )
666
664
  ),
667
665
 
@@ -1611,7 +1609,17 @@ module.exports = grammar({
1611
1609
 
1612
1610
  range_expression: ($) => prec.right(PREC.RANGE, seq(optional($.expression), '..', optional($.expression))),
1613
1611
 
1614
- tuple_expression: ($) => seq('(', commaSep2($.argument), ')'),
1612
+ tuple_expression: ($) => seq('(', commaSep2(alias($._tuple_argument, $.argument)), ')'),
1613
+
1614
+ _tuple_argument: ($) =>
1615
+ prec(
1616
+ 1,
1617
+ seq(
1618
+ optional(seq(field('name', $.identifier), ':')),
1619
+ optional(choice('ref', 'out', 'in')),
1620
+ choice($.expression, $.declaration_expression)
1621
+ )
1622
+ ),
1615
1623
 
1616
1624
  literal: ($) =>
1617
1625
  choice(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-c-sharp",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "description": "C# grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
Binary file
package/tree-sitter.json CHANGED
@@ -19,7 +19,7 @@
19
19
  }
20
20
  ],
21
21
  "metadata": {
22
- "version": "1.0.17",
22
+ "version": "1.0.18",
23
23
  "license": "MIT",
24
24
  "description": "C# grammar for tree-sitter",
25
25
  "authors": [