pub struct LetStatement {
pub identifier: String,
pub value_expr: String,
pub value_kind: String,
pub type_annotation: Option<TypeExpr>,
pub value_ast: Option<Expr>,
pub loc: Loc,
pub leading_trivia: Vec<Trivia>,
pub trailing_trivia: Vec<Trivia>,
}Fields§
§identifier: String§value_expr: String§value_kind: StringFase 17.a — preserves the parser’s tokenization intent so the runtime dispatcher can distinguish a quoted literal from a dotted-identifier reference. One of “literal”, “reference”, “expression”. Defaults to “literal” so any pre-Fase-17 caller that constructs a LetStatement directly behaves as a literal.
type_annotation: Option<TypeExpr>§Fase 51.c.3 — optional type annotation let x: <TypeExpr> = ….
None for the bare let x = … form (all pre-51.c.3 lets). Inside a
quant block the Continuous Type Invariant inspects this to enforce the
continuous-carrier discipline (DensityMatrix[D] D=2ⁿ; reject discrete
conversational types). Carries the typed encoder-boundary contract.
value_ast: Option<Expr>§Fase 70.f — the parsed expression form of the value, present only when
value_kind == "expression" (let total = price * qty + tax). The
runtime evaluates it via the pure expression evaluator instead of the
pre-§70 behaviour (which treated an expression as an opaque literal
string). None for literal / reference / list values (byte-identical to
pre-§70.f).
loc: Loc§leading_trivia: Vec<Trivia>Fase 14.b — leading comment trivia attached to this declaration (comments preceding the declaration’s first token, since the previous declaration or file start). Empty by default.
trailing_trivia: Vec<Trivia>Fase 14.b — trailing comment trivia (same line as the declaration’s last effective token). Empty by default.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LetStatement
impl RefUnwindSafe for LetStatement
impl Send for LetStatement
impl Sync for LetStatement
impl Unpin for LetStatement
impl UnsafeUnpin for LetStatement
impl UnwindSafe for LetStatement
Blanket Implementations§
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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