pub struct RequirementDecl {
pub name: Option<String>,
pub name_span: Option<ExprSpan>,
pub body: Expr,
pub leading_comment: Option<Comment>,
pub trailing_line_comment: Option<Comment>,
pub blank_line_before: bool,
pub span: ExprSpan,
}Expand description
requirement = expression [ "," identifier ] ";".
name, when present, is display metadata owned by Adam and embedding hosts in side tables,
not a cell reference or runtime identity. Checking requires labels to be unique within their
owning declaration; they may coincide with cell names. adam-rs identifies requirements by
RequirementId.
§Examples
See Module for an explicitly labeled Boolean requirement.
Fields§
§name: Option<String>The requirement’s explicit suffix label, if present.
name_span: Option<ExprSpan>The suffix identifier’s span, if present.
body: ExprThe parsed requirement body expression; must type-check as bool.
leading_comment: Option<Comment>A leading comment immediately preceding this requirement, if recovered by
crate::trivia::attach_trivia.
trailing_line_comment: Option<Comment>A ////* */ comment on the same source line as this requirement’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 requirement, if recovered by
crate::trivia::attach_trivia.
span: ExprSpanThe span of the whole expression [ "," identifier ] ";" declaration.