Skip to content
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.

Commit

Permalink
wip(solidity/references)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xSwapFeeder committed Feb 26, 2024
1 parent 3e65d70 commit 02e1e59
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libs/solc-references/src/node_finder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ impl <'ast> Visit<'ast> for NodeVisitor {
visit::visit_contract_definition(self, contract);
}

fn visit_elementary_type_name(&mut self,_elementary: &'ast ElementaryTypeName) {
if is_node_in_range(&_elementary.src, &self.position, &self.source) {
self.node = None;
}
}

fn visit_function_definition(&mut self, function: &'ast FunctionDefinition) {
if is_node_in_range(&function.src, &self.position, &self.source) {
self.above_node = self.node.clone();
Expand Down

0 comments on commit 02e1e59

Please sign in to comment.