Struct lib_ruby_parser::traverse::finder::Finder [−][src]
A struct to find sub-nodes in AST by by a given Pattern
Implementations
impl Finder[src]
pub fn run(looking_for: &str, root: &Node) -> Result<Option<Node>, PatternError>[src]
Performs a search of a given pattern on a given AST.
looking_for is a string slice that is used to construct a Pattern.
Trait Implementations
impl Debug for Finder[src]
impl Observer for Finder[src]
fn on_node(&mut self, node: &Node)[src]
fn on_subitem(&mut self, subitem: VisitorItem)[src]
fn on_subitem_moving_up(&mut self, _: VisitorItem)[src]
fn on_alias(&mut self, node: &Alias)[src]
fn on_and_asgn(&mut self, node: &AndAsgn)[src]
fn on_and(&mut self, node: &And)[src]
fn on_arg(&mut self, node: &Arg)[src]
fn on_args(&mut self, node: &Args)[src]
fn on_array(&mut self, node: &Array)[src]
fn on_array_pattern(&mut self, node: &ArrayPattern)[src]
fn on_array_pattern_with_tail(&mut self, node: &ArrayPatternWithTail)[src]
fn on_back_ref(&mut self, node: &BackRef)[src]
fn on_begin(&mut self, node: &Begin)[src]
fn on_block(&mut self, node: &Block)[src]
fn on_block_pass(&mut self, node: &BlockPass)[src]
fn on_blockarg(&mut self, node: &Blockarg)[src]
fn on_break_(&mut self, node: &Break)[src]
fn on_case(&mut self, node: &Case)[src]
fn on_case_match(&mut self, node: &CaseMatch)[src]
fn on_casgn(&mut self, node: &Casgn)[src]
fn on_cbase(&mut self, node: &Cbase)[src]
fn on_class(&mut self, node: &Class)[src]
fn on_complex(&mut self, node: &Complex)[src]
fn on_const_(&mut self, node: &Const)[src]
fn on_const_pattern(&mut self, node: &ConstPattern)[src]
fn on_csend(&mut self, node: &CSend)[src]
fn on_cvar(&mut self, node: &Cvar)[src]
fn on_cvasgn(&mut self, node: &Cvasgn)[src]
fn on_def(&mut self, node: &Def)[src]
fn on_defined(&mut self, node: &Defined)[src]
fn on_defs(&mut self, node: &Defs)[src]
fn on_dstr(&mut self, node: &Dstr)[src]
fn on_dsym(&mut self, node: &Dsym)[src]
fn on_eflipflop(&mut self, node: &EFlipFlop)[src]
fn on_empty_else(&mut self, node: &EmptyElse)[src]
fn on_encoding_(&mut self, node: &Encoding)[src]
fn on_ensure(&mut self, node: &Ensure)[src]
fn on_erange(&mut self, node: &Erange)[src]
fn on_false_(&mut self, node: &False)[src]
fn on_file(&mut self, node: &File)[src]
fn on_find_pattern(&mut self, node: &FindPattern)[src]
fn on_float(&mut self, node: &Float)[src]
fn on_for_(&mut self, node: &For)[src]
fn on_forward_arg(&mut self, node: &ForwardArg)[src]
fn on_forwarded_args(&mut self, node: &ForwardedArgs)[src]
fn on_gvar(&mut self, node: &Gvar)[src]
fn on_gvasgn(&mut self, node: &Gvasgn)[src]
fn on_hash(&mut self, node: &Hash)[src]
fn on_kwargs(&mut self, node: &Kwargs)[src]
fn on_hash_pattern(&mut self, node: &HashPattern)[src]
fn on_heredoc(&mut self, node: &Heredoc)[src]
fn on_if_(&mut self, node: &If)[src]
fn on_if_guard(&mut self, node: &IfGuard)[src]
fn on_if_mod(&mut self, node: &IfMod)[src]
fn on_if_ternary(&mut self, node: &IfTernary)[src]
fn on_iflipflop(&mut self, node: &IFlipFlop)[src]
fn on_match_pattern(&mut self, node: &MatchPattern)[src]
fn on_match_pattern_p(&mut self, node: &MatchPatternP)[src]
fn on_in_pattern(&mut self, node: &InPattern)[src]
fn on_index(&mut self, node: &Index)[src]
fn on_index_asgn(&mut self, node: &IndexAsgn)[src]
fn on_int(&mut self, node: &Int)[src]
fn on_irange(&mut self, node: &Irange)[src]
fn on_ivar(&mut self, node: &Ivar)[src]
fn on_ivasgn(&mut self, node: &Ivasgn)[src]
fn on_kwarg(&mut self, node: &Kwarg)[src]
fn on_kwbegin(&mut self, node: &KwBegin)[src]
fn on_kwnilarg(&mut self, node: &Kwnilarg)[src]
fn on_kwoptarg(&mut self, node: &Kwoptarg)[src]
fn on_kwrestarg(&mut self, node: &Kwrestarg)[src]
fn on_kwsplat(&mut self, node: &Kwsplat)[src]
fn on_lambda(&mut self, node: &Lambda)[src]
fn on_line(&mut self, node: &Line)[src]
fn on_lvar(&mut self, node: &Lvar)[src]
fn on_lvasgn(&mut self, node: &Lvasgn)[src]
fn on_masgn(&mut self, node: &Masgn)[src]
fn on_match_alt(&mut self, node: &MatchAlt)[src]
fn on_match_as(&mut self, node: &MatchAs)[src]
fn on_match_current_line(&mut self, node: &MatchCurrentLine)[src]
fn on_match_nil_pattern(&mut self, node: &MatchNilPattern)[src]
fn on_match_rest(&mut self, node: &MatchRest)[src]
fn on_match_var(&mut self, node: &MatchVar)[src]
fn on_match_with_lvasgn(&mut self, node: &MatchWithLvasgn)[src]
fn on_mlhs(&mut self, node: &Mlhs)[src]
fn on_module(&mut self, node: &Module)[src]
fn on_next(&mut self, node: &Next)[src]
fn on_nil(&mut self, node: &Nil)[src]
fn on_nth_ref(&mut self, node: &NthRef)[src]
fn on_numblock(&mut self, node: &Numblock)[src]
fn on_op_asgn(&mut self, node: &OpAsgn)[src]
fn on_optarg(&mut self, node: &Optarg)[src]
fn on_or(&mut self, node: &Or)[src]
fn on_or_asgn(&mut self, node: &OrAsgn)[src]
fn on_pair(&mut self, node: &Pair)[src]
fn on_pin(&mut self, node: &Pin)[src]
fn on_postexe(&mut self, node: &Postexe)[src]
fn on_preexe(&mut self, node: &Preexe)[src]
fn on_procarg0(&mut self, node: &Procarg0)[src]
fn on_rational(&mut self, node: &Rational)[src]
fn on_redo(&mut self, node: &Redo)[src]
fn on_reg_opt(&mut self, node: &RegOpt)[src]
fn on_regexp(&mut self, node: &Regexp)[src]
fn on_rescue(&mut self, node: &Rescue)[src]
fn on_rescue_body(&mut self, node: &RescueBody)[src]
fn on_restarg(&mut self, node: &Restarg)[src]
fn on_retry(&mut self, node: &Retry)[src]
fn on_return_(&mut self, node: &Return)[src]
fn on_sclass(&mut self, node: &SClass)[src]
fn on_self_(&mut self, node: &Self_)[src]
fn on_send(&mut self, node: &Send)[src]
fn on_shadowarg(&mut self, node: &Shadowarg)[src]
fn on_splat(&mut self, node: &Splat)[src]
fn on_str_(&mut self, node: &Str)[src]
fn on_super_(&mut self, node: &Super)[src]
fn on_sym(&mut self, node: &Sym)[src]
fn on_true_(&mut self, node: &True)[src]
fn on_undef(&mut self, node: &Undef)[src]
fn on_unless_guard(&mut self, node: &UnlessGuard)[src]
fn on_until(&mut self, node: &Until)[src]
fn on_until_post(&mut self, node: &UntilPost)[src]
fn on_when(&mut self, node: &When)[src]
fn on_while_(&mut self, node: &While)[src]
fn on_while_post(&mut self, node: &WhilePost)[src]
fn on_x_heredoc(&mut self, node: &XHeredoc)[src]
fn on_xstr(&mut self, node: &Xstr)[src]
fn on_yield_(&mut self, node: &Yield)[src]
fn on_zsuper(&mut self, node: &ZSuper)[src]
fn on_node_moving_up(&mut self, node: &Node)[src]
fn on_option_node(&mut self, node: &Option<Box<Node>>)[src]
fn on_node_list(&mut self, nodes: &[Node])[src]
Auto Trait Implementations
impl RefUnwindSafe for Finder
impl Send for Finder
impl Sync for Finder
impl Unpin for Finder
impl UnwindSafe for Finder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,