You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run into the following issue: multiples return values of functions are not always parsed correctly.
For example:
the return values of func notOk() (int, map[int]int) are parsed incorrectly into
(parameter_list (
(parameter_declaration ...
(array_type ...)) // incorrect - should have two parameter_declaration instead of one,
// no array_type expected, map_type expected
inspect the tree, I use M-x treesit-explore-mode in emacs. The whole tree is pasted below. EDIT: below in a comment is the tree produced by tree-sitter parse ....
the first function "ok" is as expected - ([]int, map[int]int) is parsed into one parameter_list with two parameter_declaration branches:
the second function "notOk" is not parsed as expected - (int, map[int]int) is parsed into one parameter_list with oneparameter_declaration branches, I expect twoparameter_declaration branches.
I've run into the following issue: multiples return values of functions are not always parsed correctly.
For example:
func notOk() (int, map[int]int)
are parsed incorrectly intoTo reproduce:
inspect the tree, I use
M-x treesit-explore-mode
in emacs. The whole tree is pasted below. EDIT: below in a comment is the tree produced bytree-sitter parse ...
.the first function "ok" is as expected -
([]int, map[int]int)
is parsed into oneparameter_list
with twoparameter_declaration
branches:(int, map[int]int)
is parsed into oneparameter_list
with oneparameter_declaration
branches, I expect twoparameter_declaration
branches.Full tree:
The text was updated successfully, but these errors were encountered: