pub enum SheetItem {
Cell(CellDecl),
Relationship(RelationshipDecl),
Conditional(ConditionalDecl),
Out(OutDecl),
Source(SourceDecl),
Error {
span: ExprSpan,
leading_comment: Option<Comment>,
doc_comment: Option<String>,
trailing_line_comment: Option<Comment>,
blank_line_before: bool,
},
}Expand description
One top-level item inside a sheet { ... } body.
Variants§
Cell(CellDecl)
A cell declaration.
Relationship(RelationshipDecl)
A relationship declaration.
Conditional(ConditionalDecl)
A conditional declaration.
Out(OutDecl)
An out declaration.
Source(SourceDecl)
A source declaration.
Error
A syntax error recovered at declaration granularity; span covers the skipped tokens.
Fields
leading_comment: Option<Comment>A leading ////* */ comment immediately preceding this item, if recovered by
crate::trivia::attach_trivia. Preserved even though the item failed to parse, so
a comment explaining a broken declaration (e.g. // TODO: fix this) isn’t silently
dropped.
doc_comment: Option<String>A leading /// doc comment immediately preceding this item, if recovered by
crate::AdamAstParser before parsing failed.
trailing_line_comment: Option<Comment>A ////* */ comment on the same source line as this item’s own last token, if
recovered by crate::trivia::attach_trivia. Distinct from leading_comment, which
precedes an item on its own line. See https://github.com/stlab/cel-rs/issues/59.
blank_line_before: boolWhether the gap before this item contained a blank line, if recovered by
crate::trivia::attach_trivia.