pub struct RubyVisitor<'a> {
pub file: &'a ProjectFile,
pub source: &'a str,
pub parsed: &'a mut ParsedFile,
}Expand description
Walks a Ruby file and emits its declarations into parsed.
Ruby symbol identity follows the shared CodeUnit scheme used by every
bifrost analyzer: package_name is empty, nested namespaces/types are joined
in short_name with $, and a type’s members are appended after a .. So
module A; class B; def c yields A$B (class) and A$B.c (method), which
CodeUnit::identifier resolves back to B and c.
Fields§
§file: &'a ProjectFile§source: &'a str§parsed: &'a mut ParsedFileImplementations§
Source§impl RubyVisitor<'_>
impl RubyVisitor<'_>
pub fn visit_program(&mut self, root: Node<'_>)
Auto Trait Implementations§
impl<'a> !UnwindSafe for RubyVisitor<'a>
impl<'a> Freeze for RubyVisitor<'a>
impl<'a> RefUnwindSafe for RubyVisitor<'a>
impl<'a> Send for RubyVisitor<'a>
impl<'a> Sync for RubyVisitor<'a>
impl<'a> Unpin for RubyVisitor<'a>
impl<'a> UnsafeUnpin for RubyVisitor<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more