Enum valkyrie_ast::ValkyrieOperator
source · pub enum ValkyrieOperator {
Show 47 variants
Placeholder,
Not,
Positive,
Negative,
CovariantType,
ContravariantType,
Box,
Unbox,
Unpack {
level: u8,
},
Reciprocal,
Roots(u8),
Assign {
monadic: bool,
},
Plus,
PlusAssign,
Concat,
Less {
equal: bool,
},
Greater {
equal: bool,
},
MuchGreater,
MuchLess,
VeryMuchGreater,
VeryMuchLess,
Equal {
negative: bool,
},
StrictlyEqual {
negative: bool,
},
RangeTo {
equal: bool,
},
Is {
negative: bool,
},
In {
negative: bool,
},
Contains {
negative: bool,
},
Minus,
MinusAssign,
Multiply,
Divide,
Remainder,
Modulo,
DivideRemainder,
DivideFloor,
Power,
Surd,
LogicMatrix {
mask: LogicMatrix,
},
Map,
Optional,
QuickRaise,
Celsius,
Fahrenheit,
DivideByDecimal {
power: u8,
},
Transpose,
Transjugate,
Hermitian,
}Expand description
All builtin operator in valkyrie language
Variants§
Placeholder
unassigned operator symbol
Not
prefix operator: !
Positive
prefix operator: +
Negative
prefix operator: -
CovariantType
prefix type operator: +
ContravariantType
prefix type operator: -
Box
prefix operator: &
Unbox
prefix operator: *
Unpack
prefix operator: .., ...
Reciprocal
prefix operator: ⅟
Roots(u8)
prefix operator: √, ∛, ∜
Assign
infix operator: =
Plus
binary operator: +
PlusAssign
binary operator: +=
Concat
binary operator: ++
Less
binary operator: <
Greater
binary operator: >
MuchGreater
binary operator: ≫, >>
MuchLess
binary operator:
VeryMuchGreater
binary operator: ⋙, >>>
VeryMuchLess
binary operator:
Equal
binary operator: ≡, ≢
StrictlyEqual
binary operator: ≡, ≢
RangeTo
binary operator: ..<, ..=
Is
binary operator: ⊑, ⋢, is, is not
In
binary operator: ∈, ∉, in, not in
Contains
binary operator: ∋, ∌
Minus
binary operator: -
MinusAssign
binary operator: -=
Multiply
binary operator: *
Divide
binary operator: /
Remainder
binary operator: %
Modulo
binary operator: ٪, ⁒, %%
DivideRemainder
binary operator: ÷, /%
DivideFloor
binary operator: /_
Power
binary operator: ^
Surd
binary operator: √
LogicMatrix
Fields
mask: LogicMatrixbinary operator: &, |
binary operator: &, |
Map
binary operator: /@
Optional
suffix operator: ?
QuickRaise
suffix operator: !
Celsius
suffix operator: ℃
Fahrenheit
suffix operator: ℉
DivideByDecimal
suffix operator: ⁒, %, ‰, ‱
Transpose
suffix operator: ᵀ, \^T, \transpose
Transjugate
suffix operator: ᴴ, \^H, `\conjugate_transpose
Hermitian
suffix operator: \hat
Implementations§
source§impl ValkyrieOperator
impl ValkyrieOperator
sourcepub fn precedence(&self) -> Precedence
pub fn precedence(&self) -> Precedence
Get the precedence of the operator, larger number means higher precedence.
sourcepub fn associativity(&self) -> Associativity
pub fn associativity(&self) -> Associativity
Get the associativity of the operator.
sourcepub fn accept_arguments(&self) -> usize
pub fn accept_arguments(&self) -> usize
user input arguments
sourcepub fn overrideable(&self) -> bool
pub fn overrideable(&self) -> bool
if this operatr can be override
Trait Implementations§
source§impl Clone for ValkyrieOperator
impl Clone for ValkyrieOperator
source§fn clone(&self) -> ValkyrieOperator
fn clone(&self) -> ValkyrieOperator
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ValkyrieOperator
impl Debug for ValkyrieOperator
source§impl Display for ValkyrieOperator
impl Display for ValkyrieOperator
source§impl From<LogicMatrix> for ValkyrieOperator
impl From<LogicMatrix> for ValkyrieOperator
source§fn from(logic: LogicMatrix) -> Self
fn from(logic: LogicMatrix) -> Self
source§impl Hash for ValkyrieOperator
impl Hash for ValkyrieOperator
source§impl PartialEq for ValkyrieOperator
impl PartialEq for ValkyrieOperator
source§fn eq(&self, other: &ValkyrieOperator) -> bool
fn eq(&self, other: &ValkyrieOperator) -> bool
self and other values to be equal, and is used
by ==.