welly_parser::welly

Type Alias Op

source
pub type Op = Op;

Aliased Type§

enum Op {
Show 34 variants Query, Pow, BitNot, Plus, Minus, Borrow, Share, Clone, Mul, Div, Rem, Add, Sub, SL, ASR, LSR, BitAnd, BitXor, BitOr, Cast, Exclusive, Inclusive, LT, GT, LE, GE, LG, EQ, NE, In, BoolNot, BoolAnd, BoolOr, Missing,
}

Variants§

§

Query

OK(x)? is x; ERR(x)? returns ERR(x).

§

Pow

(-7) ** 2 is 49.

§

BitNot

~3 is -4.

§

Plus

+3 is 3.

§

Minus

-3 is -3.

§

Borrow

&x is borrowed.

§

Share

$x is shared.

§

Clone

*x is a fresh copy of x.

§

Mul

-7 * 2 is -14.

§

Div

-7 / 2 is -4.

§

Rem

-7 % 2 is 1.

§

Add

3 + 5 is 8.

§

Sub

3 - 5 is -2.

§

SL

-7 << 2 is -28.

§

ASR

-7 >> 2 is -2.

§

LSR

-7 >>> 2 is (1 << 62) - 2.

§

BitAnd

3 & 5 is 1.

§

BitXor

3 ^ 5 is 6.

§

BitOr

3 | 5 is 7.

§

Cast

x: t - A value x cast to a type t.

§

Exclusive

0..3 means 0, 1, 2.

§

Inclusive

0...3 means 0, 1, 2, 3.

§

LT

3 < 5 is true.

§

GT

5 > 3 is true.

§

LE

3 <= 5 is true.

§

GE

5 >= 3 is true.

§

LG

3 <> 5 is true.

§

EQ

3 == 5 is false.

§

NE

3 != 5 is true.

§

In

item in collection - Membership test.

Also abused as part of for item in collection { ... }.

§

BoolNot

not false is true.

§

BoolAnd

false and true is false.

§

BoolOr

false or true is true.

§

Missing

Used when two expressions are juxtaposed. Always an error.