Enum boa::syntax::ast::op::NumOp [−][src]
pub enum NumOp {
Add,
Sub,
Div,
Mul,
Exp,
Mod,
}Expand description
Arithmetic operators take numerical values (either literals or variables) as their operands and return a single numerical value.
More information:
Variants
The addition operator produces the sum of numeric operands or string concatenation.
Syntax: x + y
More information:
The subtraction operator subtracts the two operands, producing their difference.
Syntax: x - y
More information:
The division operator produces the quotient of its operands where the left operand is the dividend and the right operand is the divisor.
Syntax: x / y
More information:
The multiplication operator produces the product of the operands.
Syntax: x * y
More information:
The exponentiation operator returns the result of raising the first operand to the power of the second operand.
Syntax: x ** y
The exponentiation operator is right-associative. a ** b ** c is equal to a ** (b ** c).
More information:
The remainder operator returns the remainder left over when one operand is divided by a second operand.
Syntax: x % y
The remainder operator always takes the sign of the dividend.
More information:
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for NumOp
impl UnwindSafe for NumOp
Blanket Implementations
Mutably borrows from an owned value. Read more