mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
refactor(ast): rename function params (#3487)
Rename function params from `_kind` to `kind`. This has no practical effect but makes Rust Analyser give nicer param name hints when using these APIs.
This commit is contained in:
parent
286b5ed3d7
commit
9c3d1631a4
2 changed files with 12 additions and 6 deletions
|
|
@ -13,10 +13,13 @@ use walk::*;
|
|||
|
||||
/// Syntax tree traversal
|
||||
pub trait Visit<'a>: Sized {
|
||||
fn enter_node(&mut self, _kind: AstKind<'a>) {}
|
||||
fn leave_node(&mut self, _kind: AstKind<'a>) {}
|
||||
#[allow(unused_variables)]
|
||||
fn enter_node(&mut self, kind: AstKind<'a>) {}
|
||||
#[allow(unused_variables)]
|
||||
fn leave_node(&mut self, kind: AstKind<'a>) {}
|
||||
|
||||
fn enter_scope(&mut self, _flags: ScopeFlags) {}
|
||||
#[allow(unused_variables)]
|
||||
fn enter_scope(&mut self, flags: ScopeFlags) {}
|
||||
fn leave_scope(&mut self) {}
|
||||
|
||||
fn alloc<T>(&self, t: &T) -> &'a T {
|
||||
|
|
|
|||
|
|
@ -10,10 +10,13 @@ use self::walk_mut::*;
|
|||
|
||||
/// Syntax tree traversal to mutate an exclusive borrow of a syntax tree in place.
|
||||
pub trait VisitMut<'a>: Sized {
|
||||
fn enter_node(&mut self, _kind: AstType) {}
|
||||
fn leave_node(&mut self, _kind: AstType) {}
|
||||
#[allow(unused_variables)]
|
||||
fn enter_node(&mut self, kind: AstType) {}
|
||||
#[allow(unused_variables)]
|
||||
fn leave_node(&mut self, kind: AstType) {}
|
||||
|
||||
fn enter_scope(&mut self, _flags: ScopeFlags) {}
|
||||
#[allow(unused_variables)]
|
||||
fn enter_scope(&mut self, flags: ScopeFlags) {}
|
||||
fn leave_scope(&mut self) {}
|
||||
|
||||
fn visit_program(&mut self, program: &mut Program<'a>) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue