@willbooster/tree-sitter-c-sharp 1.0.9 → 1.0.10

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
@@ -83,6 +83,7 @@ module.exports = grammar({
83
83
  [$.constant_pattern, $.lvalue_expression, $._name],
84
84
 
85
85
  [$.type, $._name_invocation_pattern, $.recursive_pattern],
86
+ [$.type, $.recursive_pattern],
86
87
  [$.attribute, $.type, $._name_invocation_pattern, $.recursive_pattern],
87
88
 
88
89
  [$.parenthesized_pattern, $._parenthesized_pattern_with_designation],
@@ -1082,10 +1083,15 @@ module.exports = grammar({
1082
1083
  prec.dynamic(1, seq($.positional_pattern_clause, $._simple_designation)),
1083
1084
  // positional pattern without variable designation (no type prefix)
1084
1085
  $.positional_pattern_clause,
1085
- // other type followed by pattern clauses (type is required here to avoid ambiguity)
1086
+ // other type followed by a property pattern clause
1087
+ seq(field('type', $.type), $.property_pattern_clause, optional($._simple_designation)),
1088
+ // A positional clause follows only a name (above), a predefined type, or an array type. Letting any type take
1089
+ // one reads `Name(A.B)` once more, through `type`; after a syntax error, the extra GLR versions then exceed
1090
+ // the runtime's limit, and which reading survives depends on the versions alive, not on dynamic precedence.
1086
1091
  seq(
1087
- field('type', $.type),
1088
- choice(seq($.positional_pattern_clause, optional($.property_pattern_clause)), $.property_pattern_clause),
1092
+ field('type', choice($.predefined_type, $.array_type)),
1093
+ $.positional_pattern_clause,
1094
+ optional($.property_pattern_clause),
1089
1095
  optional($._simple_designation)
1090
1096
  ),
1091
1097
  // no type, just pattern clauses (no variable designation to avoid conflict with above)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-c-sharp",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
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.9",
22
+ "version": "1.0.10",
23
23
  "license": "MIT",
24
24
  "description": "C# grammar for tree-sitter",
25
25
  "authors": [