Enum moore_svlog::ast::ExprData [−][src]
pub enum ExprData<'a> {
Show 30 variants
DummyExpr,
LiteralExpr(Lit),
IdentExpr(Spanned<Name>),
SysIdentExpr(Spanned<Name>),
ThisExpr,
DollarExpr,
NullExpr,
ScopeExpr(Box<Node<'a, ExprData<'a>>, Global>, Spanned<Name>),
IndexExpr {
indexee: Box<Node<'a, ExprData<'a>>, Global>,
index: Box<Node<'a, ExprData<'a>>, Global>,
},
UnaryExpr {
op: Op,
expr: Box<Node<'a, ExprData<'a>>, Global>,
postfix: bool,
},
BinaryExpr {
op: Op,
lhs: Box<Node<'a, ExprData<'a>>, Global>,
rhs: Box<Node<'a, ExprData<'a>>, Global>,
},
TernaryExpr {
cond: Box<Node<'a, ExprData<'a>>, Global>,
true_expr: Box<Node<'a, ExprData<'a>>, Global>,
false_expr: Box<Node<'a, ExprData<'a>>, Global>,
},
AssignExpr {
op: AssignOp,
lhs: Box<Node<'a, ExprData<'a>>, Global>,
rhs: Box<Node<'a, ExprData<'a>>, Global>,
},
CallExpr(Box<Node<'a, ExprData<'a>>, Global>, Vec<CallArg<'a>, Global>),
TypeExpr(Box<Node<'a, TypeData<'a>>, Global>),
ConstructorCallExpr(Vec<CallArg<'a>, Global>),
ClassNewExpr(Option<Box<Node<'a, ExprData<'a>>, Global>>),
ArrayNewExpr(Box<Node<'a, ExprData<'a>>, Global>, Option<Box<Node<'a, ExprData<'a>>, Global>>),
EmptyQueueExpr,
StreamConcatExpr {
slice: Option<StreamConcatSlice<'a>>,
exprs: Vec<StreamExpr<'a>, Global>,
},
ConcatExpr {
repeat: Option<Box<Node<'a, ExprData<'a>>, Global>>,
exprs: Vec<Node<'a, ExprData<'a>>, Global>,
},
MinTypMaxExpr {
min: Box<Node<'a, ExprData<'a>>, Global>,
typ: Box<Node<'a, ExprData<'a>>, Global>,
max: Box<Node<'a, ExprData<'a>>, Global>,
},
RangeExpr {
mode: RangeMode,
lhs: Box<Node<'a, ExprData<'a>>, Global>,
rhs: Box<Node<'a, ExprData<'a>>, Global>,
},
MemberExpr {
expr: Box<Node<'a, ExprData<'a>>, Global>,
name: Spanned<Name>,
},
PatternExpr(Vec<Node<'a, PatternFieldData<'a>>, Global>),
InsideExpr(Box<Node<'a, ExprData<'a>>, Global>, Vec<ValueRange<'a>, Global>),
CastExpr(Node<'a, TypeData<'a>>, Box<Node<'a, ExprData<'a>>, Global>),
CastSizeExpr(Box<Node<'a, ExprData<'a>>, Global>, Box<Node<'a, ExprData<'a>>, Global>),
CastSignExpr(Spanned<TypeSign>, Box<Node<'a, ExprData<'a>>, Global>),
BitsExpr {
name: Spanned<Name>,
arg: TypeOrExpr<'a>,
},
}
Expand description
An expression.
Variants
LiteralExpr(Lit)
Tuple Fields of LiteralExpr
0: Lit
An identifier, like foo
.
A system identifier, like $foo
.
Fields of IndexExpr
Fields of BinaryExpr
Fields of TernaryExpr
Fields of AssignExpr
Tuple Fields of ArrayNewExpr
Fields of StreamConcatExpr
slice: Option<StreamConcatSlice<'a>>
exprs: Vec<StreamExpr<'a>, Global>
Fields of ConcatExpr
Fields of MinTypMaxExpr
Fields of RangeExpr
A member expression, like a.b
.
PatternExpr(Vec<Node<'a, PatternFieldData<'a>>, Global>)
Tuple Fields of PatternExpr
0: Vec<Node<'a, PatternFieldData<'a>>, Global>
Tuple Fields of CastSizeExpr
A $bits
call.
Fields of BitsExpr
name: Spanned<Name>
arg: TypeOrExpr<'a>
Trait Implementations
Get this node’s name, or None
if it does not have one.
Describe this node for diagnostics in indefinite form, e.g. “entity”. Read more
Describe this node for diagnostics in definite form, e.g. “entity ‘top’”. Read more
Describe this node for diagnostics in indefinite form, e.g. “entity”.
Describe this node for diagnostics in definite form, e.g. “entity ‘top’”. Read more
Describe this node for diagnostics in indefinite form, e.g. “entity”.
Describe this node for diagnostics in definite form, e.g. “entity ‘top’”. Read more
Apply a function to each child node.
Apply a function to this node.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for ExprData<'a>
impl<'a> !UnwindSafe for ExprData<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more