Enum ExprKind
#[non_exhaustive]pub enum ExprKind {
Show 21 variants
CoordinateMapFactor {
factor: CoordinateMapFactor,
source: Vec<NamePath>,
at: Vec<(NamePath, Expr)>,
},
Pullback {
value: Box<Expr>,
source: Vec<NamePath>,
at: Vec<(NamePath, Expr)>,
},
Evaluate {
value: Box<Expr>,
at: Vec<(NamePath, Expr)>,
side: Option<BoundarySideSyntax>,
},
Partial {
value: Box<Expr>,
wrt: NamePath,
holding: Vec<NamePath>,
},
Boolean(bool),
Number(DecimalLiteral),
Quantity {
value: DecimalLiteral,
unit: Box<Expr>,
},
Array(Vec<Expr>),
Tuple(Vec<Expr>),
Index {
value: Box<Expr>,
index: Box<Expr>,
},
Slice {
value: Box<Expr>,
lower: Box<Expr>,
upper: Box<Expr>,
},
Member {
value: Box<Expr>,
member: String,
},
Name(String),
Path(NamePath),
BoundaryPortSelection {
port: Box<NamePath>,
selector: Box<BoundaryPortSelectorSyntax>,
},
Unary {
op: UnaryOp,
value: Box<Expr>,
},
Binary {
op: BinaryOp,
left: Box<Expr>,
right: Box<Expr>,
},
Case {
value: Box<Expr>,
arms: Vec<CaseArm>,
},
Select {
condition: Box<Expr>,
then_value: Box<Expr>,
else_value: Box<Expr>,
},
Reduction {
operation: ReductionOp,
binder: FamilyBinderSyntax,
value: Box<Expr>,
},
Call {
callee: NamePath,
arguments: CallArguments,
},
}Description
Recursive parser AST. Canonical residual storage is the lowered DAG.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
CoordinateMapFactor
Differential factor of an explicit map between ordered coordinates.
Fields
factor: CoordinateMapFactorSigned Jacobian, volume scale, or orientation.
Pullback
Pull an invariant scalar along a map between exact coordinate supports.
Fields
Evaluate
Bind exact coordinate projections to dimensioned points, without choosing a reconstruction.
Fields
side: Option<BoundarySideSyntax>Requested one-sided value for a one-dimensional discontinuous representation.
Partial
An explicit first partial with compile-time independent-input bindings.
Fields
Boolean(bool)
Boolean truth value, distinct from numeric literals.
Number(DecimalLiteral)
Exact decimal literal, interpreted in its required value-domain context.
Quantity
Numeric literal with an explicit input-unit expression.
Fields
value: DecimalLiteralExact decimal value before unit conversion.
Array(Vec<Expr>)
Nonempty ordered channel-array elements; rectangularity is checked during lowering.
Tuple(Vec<Expr>)
Compile-time structural tuple; never implicitly a value array or tensor.
Index
Select one channel from a value; index legality is checked during lowering.
Slice
Nonempty immutable half-open channel slice with explicit static bounds.
Fields
Member
Member of a statically selected indexed component occurrence.
Name(String)
Source identifier.
Path(NamePath)
Qualified lexical or instance-member name.
BoundaryPortSelection
One boundary-family Port selected by an exact boundary spelling.
Fields
selector: Box<BoundaryPortSelectorSyntax>Closed boundary selector.
Unary
Prefix operator.
Binary
Infix operator.
Case
Exhaustive value selection over one nominal enumeration.
Fields
Select
Lazy value selection; both branches remain authored expressions.
Fields
Reduction
Ordered reduction over one nonempty bounded nominal index set.
Fields
operation: ReductionOpScalar reduction operation, evaluated in index-set order.
binder: FamilyBinderSyntaxLexical member binding and exact set name.
Call
Qualified named operator with one or more ordered arguments.
Fields
arguments: CallArgumentsNonempty ordered arguments.
Trait Implementations§
§impl Clone for ExprKind
impl Clone for ExprKind
§impl Debug for ExprKind
impl Debug for ExprKind
§impl PartialEq for ExprKind
impl PartialEq for ExprKind
§fn eq(&self, other: &ExprKind) -> bool
fn eq(&self, other: &ExprKind) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExprKind
Auto Trait Implementations§
impl Freeze for ExprKind
impl RefUnwindSafe for ExprKind
impl Send for ExprKind
impl Sync for ExprKind
impl Unpin for ExprKind
impl UnsafeUnpin for ExprKind
impl UnwindSafe for ExprKind
Blanket Implementations§
Source§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Source§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
§fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
§fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
Source§impl<T> From<T> for T
impl<T> From<T> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Same for T
impl<T> Same for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.