@willbooster/tree-sitter-go 2.1.2 → 2.1.4
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 +19 -5
- package/package.json +10 -10
- package/tree-sitter-go.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -85,15 +85,17 @@ module.exports = grammar({
|
|
|
85
85
|
word: $ => $.identifier,
|
|
86
86
|
|
|
87
87
|
conflicts: $ => [
|
|
88
|
+
[$._generic_function, $._expression],
|
|
89
|
+
[$._generic_function, $._simple_type, $._expression],
|
|
90
|
+
[$._generic_function, $._simple_type, $.generic_type, $._expression],
|
|
91
|
+
[$._generic_function, $.type_parameter_declaration, $._simple_type, $.generic_type, $._expression],
|
|
88
92
|
[$._simple_type, $._expression],
|
|
89
|
-
[$._simple_type, $.generic_type, $._expression],
|
|
90
93
|
[$.qualified_type, $._expression],
|
|
91
94
|
[$.generic_type, $._simple_type],
|
|
92
95
|
[$.parameter_declaration, $._simple_type],
|
|
93
96
|
[$.type_parameter_declaration, $._simple_type],
|
|
94
97
|
[$.type_parameter_declaration, $._simple_type, $._expression],
|
|
95
98
|
[$.type_parameter_declaration, $._expression],
|
|
96
|
-
[$.type_parameter_declaration, $._simple_type, $.generic_type, $._expression],
|
|
97
99
|
],
|
|
98
100
|
|
|
99
101
|
reserved: {
|
|
@@ -690,14 +692,26 @@ module.exports = grammar({
|
|
|
690
692
|
')',
|
|
691
693
|
),
|
|
692
694
|
|
|
695
|
+
_generic_function: $ => choice(
|
|
696
|
+
$.identifier,
|
|
697
|
+
$.selector_expression,
|
|
698
|
+
alias($._parenthesized_generic_function, $.parenthesized_expression),
|
|
699
|
+
),
|
|
700
|
+
|
|
701
|
+
_parenthesized_generic_function: $ => seq('(', $._generic_function, ')'),
|
|
702
|
+
|
|
693
703
|
call_expression: $ => prec(PREC.primary, choice(
|
|
694
704
|
seq(
|
|
695
705
|
field('function', alias(choice('new', 'make'), $.identifier)),
|
|
696
706
|
field('arguments', alias($.special_argument_list, $.argument_list)),
|
|
697
707
|
),
|
|
708
|
+
seq(
|
|
709
|
+
field('function', $._generic_function),
|
|
710
|
+
field('type_arguments', prec.dynamic(2, $.type_arguments)),
|
|
711
|
+
field('arguments', $.argument_list),
|
|
712
|
+
),
|
|
698
713
|
seq(
|
|
699
714
|
field('function', $._expression),
|
|
700
|
-
field('type_arguments', optional($.type_arguments)),
|
|
701
715
|
field('arguments', $.argument_list),
|
|
702
716
|
),
|
|
703
717
|
)),
|
|
@@ -768,13 +782,13 @@ module.exports = grammar({
|
|
|
768
782
|
')',
|
|
769
783
|
)),
|
|
770
784
|
|
|
771
|
-
type_conversion_expression: $ => prec.dynamic(-1, seq(
|
|
785
|
+
type_conversion_expression: $ => prec(PREC.primary, prec.dynamic(-1, seq(
|
|
772
786
|
field('type', $._type),
|
|
773
787
|
'(',
|
|
774
788
|
field('operand', $._expression),
|
|
775
789
|
optional(','),
|
|
776
790
|
')',
|
|
777
|
-
)),
|
|
791
|
+
))),
|
|
778
792
|
|
|
779
793
|
type_instantiation_expression: $ => prec.dynamic(-1, seq(
|
|
780
794
|
field('type', $._type),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/tree-sitter-go",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.4",
|
|
4
4
|
"description": "Go grammar for tree-sitter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"incremental",
|
|
@@ -46,19 +46,19 @@
|
|
|
46
46
|
"@vitest/browser-playwright": "5.0.3",
|
|
47
47
|
"@willbooster/oxfmt-config": "1.2.2",
|
|
48
48
|
"@willbooster/oxlint-config": "1.4.8",
|
|
49
|
-
"@willbooster/wb": "22.
|
|
50
|
-
"@willbooster/web-tree-sitter": "2.0.
|
|
51
|
-
"conventional-changelog-conventionalcommits": "10.4.
|
|
52
|
-
"lefthook": "2.1
|
|
53
|
-
"oxfmt": "0.
|
|
54
|
-
"oxlint": "1.
|
|
55
|
-
"oxlint-tsgolint": "7.0.
|
|
56
|
-
"playwright": "1.
|
|
49
|
+
"@willbooster/wb": "22.26.1",
|
|
50
|
+
"@willbooster/web-tree-sitter": "2.0.25",
|
|
51
|
+
"conventional-changelog-conventionalcommits": "10.4.1",
|
|
52
|
+
"lefthook": "2.2.1",
|
|
53
|
+
"oxfmt": "0.72.0",
|
|
54
|
+
"oxlint": "1.87.0",
|
|
55
|
+
"oxlint-tsgolint": "7.0.2004",
|
|
56
|
+
"playwright": "1.64.0",
|
|
57
57
|
"semantic-release": "25.0.9",
|
|
58
58
|
"sort-package-json": "4.0.0",
|
|
59
59
|
"typescript": "7.0.2",
|
|
60
60
|
"vitest": "5.0.3",
|
|
61
|
-
"wrangler": "4.
|
|
61
|
+
"wrangler": "4.149.0"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@willbooster/web-tree-sitter": "^2.0.0"
|
package/tree-sitter-go.wasm
CHANGED
|
Binary file
|