rename ast_visitor module to visitor
This commit is contained in:
parent
f6fc83ce02
commit
1b5cc3302b
|
@ -2086,7 +2086,7 @@ pub fn interned_type_and_value_to_comptime_number(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
use ast_visitor::AstVisitor;
|
use visitor::AstVisitor;
|
||||||
|
|
||||||
impl Ast {
|
impl Ast {
|
||||||
pub fn visitor_mut(&mut self) -> AstVisitor<&mut Self> {
|
pub fn visitor_mut(&mut self) -> AstVisitor<&mut Self> {
|
||||||
|
@ -2094,7 +2094,7 @@ impl Ast {
|
||||||
scopes: vec![],
|
scopes: vec![],
|
||||||
nodes: self
|
nodes: self
|
||||||
.get_root_file_indices()
|
.get_root_file_indices()
|
||||||
.map(|i| ast_visitor::A::PushChildren(i))
|
.map(|i| visitor::A::PushChildren(i))
|
||||||
.collect(),
|
.collect(),
|
||||||
ast: self,
|
ast: self,
|
||||||
rev: false,
|
rev: false,
|
||||||
|
@ -2105,7 +2105,7 @@ impl Ast {
|
||||||
scopes: vec![],
|
scopes: vec![],
|
||||||
nodes: self
|
nodes: self
|
||||||
.get_root_file_indices()
|
.get_root_file_indices()
|
||||||
.map(|i| ast_visitor::A::PushChildren(i))
|
.map(|i| visitor::A::PushChildren(i))
|
||||||
.collect(),
|
.collect(),
|
||||||
ast: self,
|
ast: self,
|
||||||
rev: true,
|
rev: true,
|
||||||
|
@ -2117,7 +2117,7 @@ impl Ast {
|
||||||
scopes: vec![],
|
scopes: vec![],
|
||||||
nodes: self
|
nodes: self
|
||||||
.get_root_file_indices()
|
.get_root_file_indices()
|
||||||
.map(|i| ast_visitor::A::PushChildren(i))
|
.map(|i| visitor::A::PushChildren(i))
|
||||||
.collect(),
|
.collect(),
|
||||||
ast: self,
|
ast: self,
|
||||||
rev: false,
|
rev: false,
|
||||||
|
@ -2125,7 +2125,7 @@ impl Ast {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub mod ast_visitor {
|
pub mod visitor {
|
||||||
use super::*;
|
use super::*;
|
||||||
pub trait AstExt {
|
pub trait AstExt {
|
||||||
fn get_node_children(&self, node: Index) -> Vec<Index>;
|
fn get_node_children(&self, node: Index) -> Vec<Index>;
|
||||||
|
|
Loading…
Reference in a new issue