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 = [ "@" identifier ] expression ";".
name, when present, is a plain string label passed to adam_rs::Sheet::add_requirement,
not a cell reference — it may coincide with a cell name declared elsewhere in the sheet but
doesn’t have to.
Fields§
§name: Option<String>The requirement’s declared label, if the @identifier marker was present.
name_span: Option<ExprSpan>The @identifier marker’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 [ "@" identifier ] expr; declaration.
Trait Implementations§
Source§impl Clone for RequirementDecl
impl Clone for RequirementDecl
Source§fn clone(&self) -> RequirementDecl
fn clone(&self) -> RequirementDecl
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more