pub struct Sheet {
pub name: String,
pub name_span: ExprSpan,
pub items: Vec<SheetItem>,
pub leading_comment: Option<Comment>,
pub doc_comment: Option<String>,
pub trailing_comment: Option<Comment>,
pub blank_line_before_close: bool,
pub open_brace_span: ExprSpan,
pub span: ExprSpan,
pub errors: Vec<ParseError>,
}Expand description
A parsed adam-lang sheet declaration, with source spans on every node.
Built by crate::AdamAstParser; consumed by the language server, the formatter, and the
(separate, future) compile-to-Sheet phase.
Fields§
§name: StringThe sheet’s declared name.
name_span: ExprSpanThe name token’s span.
items: Vec<SheetItem>The sheet’s items, in declaration order.
leading_comment: Option<Comment>A leading ////* */ comment immediately preceding the sheet keyword (e.g. a file
header), if recovered by crate::trivia::attach_trivia. Unlike every other node’s
leading_comment, this one has no enclosing sibling list to attach via — it covers the
gap between the start of the source and the sheet’s own span.
doc_comment: Option<String>A leading //! doc comment immediately preceding the sheet keyword, if recovered by
crate::AdamAstParser.
trailing_comment: Option<Comment>A trailing comment immediately preceding the sheet’s own closing }, if recovered. See
https://github.com/stlab/cel-rs/issues/52.
blank_line_before_close: boolWhether a blank line preceded the sheet’s own closing }, if recovered. See
https://github.com/stlab/cel-rs/issues/52.
open_brace_span: ExprSpanThe span of the sheet’s own opening {, used to recover trailing trivia when items is
empty. See https://github.com/stlab/cel-rs/issues/52.
span: ExprSpanThe span of the whole sheet ... { ... } construct.
errors: Vec<ParseError>Syntax errors recovered while parsing, in source order. Empty for a syntactically clean sheet.