Enum rgbds_obj::RpnOp [−][src]
pub enum RpnOp<'a> { }
A RPN operation; since this means “operation on the RPN stack” here, this includes literals, not just operators.
Variants
+
operator.
-
operator.
*
operator.
/
operator.
%
operator.
Unary -
operator.
**
operator.
|
operator.
&
operator.
^
operator.
~
operator.
&&
operator.
||
operator.
!
operator.
==
operator.
!=
operator.
>
operator.
<
operator.
>=
operator.
<=
operator.
<<
operator.
>>
operator.
BankSym(u32)
BANK(Symbol)
BANK("section")
BANK(@)
SIZEOF("section")
STARTOF("section")
HRAM check (check if the value is in HRAM range, then & 0xFF
).
rst
check (check if the value is a rst
target, then | 0xC7
).
Int(u32)
32-bit literal.
Sym(u32)
Symbol (referenced by 32-bit ID).
Implementations
impl RpnOp<'_>
[src]
impl RpnOp<'_>
[src]pub fn precedence(&self) -> u8
[src]
pub fn precedence(&self) -> u8
[src]pub fn is_associative(&self) -> bool
[src]
pub fn is_associative(&self) -> bool
[src]Whether this operation is associative; that is, if A op (B op C) == (A op B) op C
.
Panics
This function panics if the operation is not a binary operator.
pub fn needs_parens(&self, parent: &RpnOp<'_>, is_left: bool) -> bool
[src]
pub fn needs_parens(&self, parent: &RpnOp<'_>, is_left: bool) -> bool
[src]Computes whether parens are needed (for pretty-printing) around a child expression, with the given parent.
Trait Implementations
impl<'a> StructuralPartialEq for RpnOp<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for RpnOp<'a>
impl<'a> Send for RpnOp<'a>
impl<'a> Sync for RpnOp<'a>
impl<'a> Unpin for RpnOp<'a>
impl<'a> UnwindSafe for RpnOp<'a>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more