pub enum UserDefinableOperator {
}
Expand description
A user-definable operator: +
, *
, |
, etc.
Solidity reference: https://docs.soliditylang.org/en/latest/grammar.html#a4.SolidityParser.userDefinableOperator
Variants§
BitAnd(And)
&
BitNot(Tilde)
~
BitOr(Or)
|
BitXor(Caret)
^
Add(Plus)
+
Div(Slash)
/
Rem(Percent)
%
Mul(Star)
*
Sub(Minus)
-
Eq(EqEq)
==
Ge(Ge)
>=
Gt(Gt)
>
Le(Le)
<=
Lt(Lt)
<
Ne(Ne)
!=
Implementations§
Source§impl UserDefinableOperator
impl UserDefinableOperator
Sourcepub fn new_bit_and(span: Span) -> UserDefinableOperator
pub fn new_bit_and(span: Span) -> UserDefinableOperator
Creates a new BitAnd
operator with the given span
.
Sourcepub fn new_bit_not(span: Span) -> UserDefinableOperator
pub fn new_bit_not(span: Span) -> UserDefinableOperator
Creates a new BitNot
operator with the given span
.
Sourcepub fn new_bit_or(span: Span) -> UserDefinableOperator
pub fn new_bit_or(span: Span) -> UserDefinableOperator
Creates a new BitOr
operator with the given span
.
Sourcepub fn new_bit_xor(span: Span) -> UserDefinableOperator
pub fn new_bit_xor(span: Span) -> UserDefinableOperator
Creates a new BitXor
operator with the given span
.
Sourcepub fn new_add(span: Span) -> UserDefinableOperator
pub fn new_add(span: Span) -> UserDefinableOperator
Creates a new Add
operator with the given span
.
Sourcepub fn new_div(span: Span) -> UserDefinableOperator
pub fn new_div(span: Span) -> UserDefinableOperator
Creates a new Div
operator with the given span
.
Sourcepub fn new_rem(span: Span) -> UserDefinableOperator
pub fn new_rem(span: Span) -> UserDefinableOperator
Creates a new Rem
operator with the given span
.
Sourcepub fn new_mul(span: Span) -> UserDefinableOperator
pub fn new_mul(span: Span) -> UserDefinableOperator
Creates a new Mul
operator with the given span
.
Sourcepub fn new_sub(span: Span) -> UserDefinableOperator
pub fn new_sub(span: Span) -> UserDefinableOperator
Creates a new Sub
operator with the given span
.
Sourcepub fn new_eq(span: Span) -> UserDefinableOperator
pub fn new_eq(span: Span) -> UserDefinableOperator
Creates a new Eq
operator with the given span
.
Sourcepub fn new_ge(span: Span) -> UserDefinableOperator
pub fn new_ge(span: Span) -> UserDefinableOperator
Creates a new Ge
operator with the given span
.
Sourcepub fn new_gt(span: Span) -> UserDefinableOperator
pub fn new_gt(span: Span) -> UserDefinableOperator
Creates a new Gt
operator with the given span
.
Sourcepub fn new_le(span: Span) -> UserDefinableOperator
pub fn new_le(span: Span) -> UserDefinableOperator
Creates a new Le
operator with the given span
.
Sourcepub fn new_lt(span: Span) -> UserDefinableOperator
pub fn new_lt(span: Span) -> UserDefinableOperator
Creates a new Lt
operator with the given span
.
Sourcepub fn new_ne(span: Span) -> UserDefinableOperator
pub fn new_ne(span: Span) -> UserDefinableOperator
Creates a new Ne
operator with the given span
.
pub fn peek(input: &ParseBuffer<'_>, lookahead: &Lookahead1<'_>) -> bool
pub const fn as_str(self) -> &'static str
pub const fn as_debug_str(self) -> &'static str
Sourcepub const fn is_bit_and(self) -> bool
pub const fn is_bit_and(self) -> bool
Returns true if self
matches Self::BitAnd
.
Sourcepub const fn is_bit_not(self) -> bool
pub const fn is_bit_not(self) -> bool
Returns true if self
matches Self::BitNot
.
Sourcepub const fn is_bit_xor(self) -> bool
pub const fn is_bit_xor(self) -> bool
Returns true if self
matches Self::BitXor
.
Trait Implementations§
Source§impl Clone for UserDefinableOperator
impl Clone for UserDefinableOperator
Source§fn clone(&self) -> UserDefinableOperator
fn clone(&self) -> UserDefinableOperator
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for UserDefinableOperator
impl Debug for UserDefinableOperator
Source§impl Display for UserDefinableOperator
impl Display for UserDefinableOperator
Source§impl Hash for UserDefinableOperator
impl Hash for UserDefinableOperator
Source§impl Parse for UserDefinableOperator
impl Parse for UserDefinableOperator
fn parse(input: &ParseBuffer<'_>) -> Result<UserDefinableOperator, Error>
Source§impl PartialEq for UserDefinableOperator
impl PartialEq for UserDefinableOperator
Source§impl Spanned for UserDefinableOperator
impl Spanned for UserDefinableOperator
Source§fn span(&self) -> Span
fn span(&self) -> Span
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty.