pub struct BinaryExpr(/* private fields */);Implementations§
Source§impl BinaryExpr
impl BinaryExpr
Sourcepub fn namespace_access(&self) -> Option<NamespaceAccess>
pub fn namespace_access(&self) -> Option<NamespaceAccess>
If this binary expression is a namespace access — pkg::name,
pkg:::name, or the call form pkg::name(args) — the resolved package
and accessed name with their tokens. The package and name may be written
as backtick/quoted strings, which are unquoted.
Source§impl BinaryExpr
impl BinaryExpr
Sourcepub fn lhs(&self) -> Option<SyntaxElement<RLanguage>>
pub fn lhs(&self) -> Option<SyntaxElement<RLanguage>>
The left-hand operand — an element, since a leaf operand is a bare token
(x, 1, TRUE) while a compound operand is a node (a + b).
Sourcepub fn op(&self) -> Option<SyntaxToken<RLanguage>>
pub fn op(&self) -> Option<SyntaxToken<RLanguage>>
The operator token (==, +, %in%, ::, …).
pub fn op_kind(&self) -> Option<SyntaxKind>
Sourcepub fn rhs(&self) -> Option<SyntaxElement<RLanguage>>
pub fn rhs(&self) -> Option<SyntaxElement<RLanguage>>
The right-hand operand element.
Sourcepub fn parts(
&self,
) -> Option<(SyntaxElement<RLanguage>, SyntaxToken<RLanguage>, SyntaxElement<RLanguage>)>
pub fn parts( &self, ) -> Option<(SyntaxElement<RLanguage>, SyntaxToken<RLanguage>, SyntaxElement<RLanguage>)>
Split into (lhs, operator, rhs) at the top-level operator token.
Trait Implementations§
Source§impl AstNode for BinaryExpr
impl AstNode for BinaryExpr
Source§impl Clone for BinaryExpr
impl Clone for BinaryExpr
Source§impl Debug for BinaryExpr
impl Debug for BinaryExpr
impl Eq for BinaryExpr
Source§impl Hash for BinaryExpr
impl Hash for BinaryExpr
Source§impl PartialEq for BinaryExpr
impl PartialEq for BinaryExpr
impl StructuralPartialEq for BinaryExpr
Auto Trait Implementations§
impl !RefUnwindSafe for BinaryExpr
impl !Send for BinaryExpr
impl !Sync for BinaryExpr
impl !UnwindSafe for BinaryExpr
impl Freeze for BinaryExpr
impl Unpin for BinaryExpr
impl UnsafeUnpin for BinaryExpr
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