pub type DefaultArithmetic = Arithmetic<String>;
Expand description
Type alias for the default Arithmetic
representation.
Aliased Type§
pub enum DefaultArithmetic {
Show 32 variants
Var(String),
Literal(isize),
Pow(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
PostIncr(String),
PostDecr(String),
PreIncr(String),
PreDecr(String),
UnaryPlus(Box<Arithmetic<String>>),
UnaryMinus(Box<Arithmetic<String>>),
LogicalNot(Box<Arithmetic<String>>),
BitwiseNot(Box<Arithmetic<String>>),
Mult(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
Div(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
Modulo(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
Add(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
Sub(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
ShiftLeft(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
ShiftRight(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
Less(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
LessEq(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
Great(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
GreatEq(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
Eq(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
NotEq(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
BitwiseAnd(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
BitwiseXor(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
BitwiseOr(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
LogicalAnd(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
LogicalOr(Box<Arithmetic<String>>, Box<Arithmetic<String>>),
Ternary(Box<Arithmetic<String>>, Box<Arithmetic<String>>, Box<Arithmetic<String>>),
Assign(String, Box<Arithmetic<String>>),
Sequence(Vec<Arithmetic<String>>),
}
Variants§
Var(String)
The value of a variable, e.g. $var
or var
.
Literal(isize)
A numeric literal such as 42
or 0xdeadbeef
.
Pow(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left ** right
.
PostIncr(String)
Returns the current value of a variable,
and then increments its value immediately after, e.g. var++
PostDecr(String)
Returns the current value of a variable,
and then decrements its value immediately after, e.g. var--
PreIncr(String)
Increments the value of a variable and returns the new value, e.g. ++var
.
PreDecr(String)
Decrements the value of a variable and returns the new value, e.g. --var
.
UnaryPlus(Box<Arithmetic<String>>)
Ensures the sign of the underlying result is positive, e.g. +(1-2)
.
UnaryMinus(Box<Arithmetic<String>>)
Ensures the sign of the underlying result is negative, e.g. -(1+2)
.
LogicalNot(Box<Arithmetic<String>>)
Returns one if the underlying result is zero, or zero otherwise, e.g. !expr
.
BitwiseNot(Box<Arithmetic<String>>)
Flips all bits from the underlying result, e.g. ~expr
.
Mult(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left * right
Div(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left / right
Modulo(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left % right
Add(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left + right
Sub(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left - right
ShiftLeft(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left << right
ShiftRight(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left >> right
Less(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left < right
LessEq(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left <= right
Great(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left > right
GreatEq(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left >= right
Eq(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left == right
NotEq(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left != right
BitwiseAnd(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left & right
BitwiseXor(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left ^ right
BitwiseOr(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left | right
LogicalAnd(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left && right
LogicalOr(Box<Arithmetic<String>>, Box<Arithmetic<String>>)
left || right
Ternary(Box<Arithmetic<String>>, Box<Arithmetic<String>>, Box<Arithmetic<String>>)
first ? second : third
Assign(String, Box<Arithmetic<String>>)
Assigns the value of an underlying expression to a
variable and returns the value, e.g. x = 5
, or x += 2
.
Sequence(Vec<Arithmetic<String>>)
expr[, expr[, ...]]