pub struct OutDecl {
pub name: String,
pub name_span: ExprSpan,
pub type_name: Option<TypeExpr>,
pub initializer: Expr,
pub filter: Option<CellFilter>,
pub require: Option<RequireBlock>,
pub leading_comment: Option<Comment>,
pub doc_comment: Option<String>,
pub trailing_line_comment: Option<Comment>,
pub blank_line_before: bool,
pub span: ExprSpan,
}Expand description
out_decl = "out" identifier [ ":" type_expr ] ":=" expression [ cell_filter ] [ "require" "{" { requirement } "}" ] ";".
type_expr is unresolved here (no TypeRegistry lookup), matching CellDecl. When
absent, the cell’s type is inferred from initializer’s result type by the compile phase
(crate::parser::AdamParser) — never here.
Fields§
§name: StringThe declared cell’s name.
name_span: ExprSpanThe name token’s span.
type_name: Option<TypeExpr>The : type_expr annotation, if present.
initializer: ExprThe parsed initializer expression that computes this cell’s value.
filter: Option<CellFilter>The filter clause, if present.
require: Option<RequireBlock>The require { ... } validation block, if present.
leading_comment: Option<Comment>A leading ////* */ comment immediately preceding this declaration, if recovered by
crate::trivia::attach_trivia.
doc_comment: Option<String>A leading /// doc comment immediately preceding this declaration, if recovered by
crate::AdamAstParser.
trailing_line_comment: Option<Comment>A ////* */ comment on the same source line as this declaration’s own last token, if
recovered by crate::trivia::attach_trivia. See
https://github.com/stlab/cel-rs/issues/59.
blank_line_before: boolWhether a blank line preceded this declaration, if recovered by
crate::trivia::attach_trivia.
span: ExprSpanThe span of the whole out ... ; declaration.