Skip to content

Commit

Permalink
[analyzer/psi/Signature.v] fix parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Lycs-D committed Jan 5, 2024
1 parent b59edea commit 93247b3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions analyzer/psi/Signature.v
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ pub fn (s &Signature) get_type() types.Type {

pub fn (n Signature) parameters() []PsiElement {
mut parameters := []PsiElement{}
list := n.find_child_by_type_or_stub(.parameter_list) or { return parameters }
parameters << list.find_children_by_type_or_stub(.parameter_declaration)
list_type := n.find_child_by_type_or_stub(.type_parameter_list) or { return parameters }
parameters << list_type.find_children_by_type_or_stub(.type_parameter_declaration)
if list := n.find_child_by_type_or_stub(.parameter_list) {
parameters << list.find_children_by_type_or_stub(.parameter_declaration)
}
if list_type := n.find_child_by_type_or_stub(.type_parameter_list) {
parameters << list_type.find_children_by_type_or_stub(.type_parameter_declaration)
}
return parameters
}

Expand Down

0 comments on commit 93247b3

Please sign in to comment.