luaur_analysis/methods/
autocomplete_node_finder_visit_ast_query_alt_c.rs1use crate::records::autocomplete_node_finder::AutocompleteNodeFinder;
2use luaur_ast::records::ast_type::AstType;
3use luaur_ast::records::location::Location;
4use luaur_ast::records::position::Position;
5
6impl AutocompleteNodeFinder {
7 pub fn visit_ast_type(&mut self, type_: *mut AstType) -> bool {
8 let location = unsafe { (*type_).base.location };
9 if location.begin < self.pos && self.pos <= location.end {
10 self.ancestry
11 .push(type_ as *mut luaur_ast::records::ast_node::AstNode);
12 return true;
13 }
14 false
15 }
16}