pub struct FunctionCollector {
pub functions: Vec<String>,
}Expand description
Example visitor that collects all function names
Fields§
§functions: Vec<String>Implementations§
Trait Implementations§
Source§impl AstVisitor for FunctionCollector
impl AstVisitor for FunctionCollector
Source§fn visit_function_call(
&mut self,
name: &str,
args: Option<&Vec<Argument>>,
modifiers: &Modifiers,
span: Span,
)
fn visit_function_call( &mut self, name: &str, args: Option<&Vec<Argument>>, modifiers: &Modifiers, span: Span, )
Visit a function call node
Source§fn visit_program(&mut self, body: &[AstNode], _span: Span)
fn visit_program(&mut self, body: &[AstNode], _span: Span)
Visit a program node
Source§fn visit_text(&mut self, content: &str, span: Span)
fn visit_text(&mut self, content: &str, span: Span)
Visit a text node
Source§fn visit_argument(&mut self, arg: &Argument)
fn visit_argument(&mut self, arg: &Argument)
Visit an argument
Source§fn visit_javascript(&mut self, code: &str, span: Span)
fn visit_javascript(&mut self, code: &str, span: Span)
Visit a JavaScript expression node
Source§fn visit_escaped(&mut self, content: &str, span: Span)
fn visit_escaped(&mut self, content: &str, span: Span)
Visit an escaped content node
Auto Trait Implementations§
impl Freeze for FunctionCollector
impl RefUnwindSafe for FunctionCollector
impl Send for FunctionCollector
impl Sync for FunctionCollector
impl Unpin for FunctionCollector
impl UnsafeUnpin for FunctionCollector
impl UnwindSafe for FunctionCollector
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more