Skip to content

Commit

Permalink
Fix legacy super/zsuper node processing.
Browse files Browse the repository at this point in the history
  • Loading branch information
castwide committed Apr 26, 2020
1 parent 3a84364 commit 34e5d6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/solargraph/parser/legacy/node_methods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,12 @@ def call_nodes_from node
result.push node
node.children[0].children[2..-1].each { |child| result.concat call_nodes_from(child) }
node.children[1..-1].each { |child| result.concat call_nodes_from(child) }
elsif [:send, :super, :zsuper].include?(node.type)
elsif node.type == :send
result.push node
node.children[2..-1].each { |child| result.concat call_nodes_from(child) }
elsif [:super, :zsuper].include?(node.type)
result.push node
node.children.each { |child| result.concat call_nodes_from(child) }
else
node.children.each { |child| result.concat call_nodes_from(child) }
end
Expand Down

0 comments on commit 34e5d6c

Please sign in to comment.