Skip to main content

finemark_ast/elements/
table.rs

1use crate::{Element, Parameters, Span};
2use serde::Serialize;
3
4#[derive(Debug, Clone, Serialize)]
5pub struct TableElement<'i> {
6    #[cfg_attr(not(feature = "include-locations"), serde(skip_serializing))]
7    pub span: Span,
8    #[cfg_attr(not(feature = "include-locations"), serde(skip_serializing))]
9    pub body_open_span: Option<Span>,
10    #[cfg_attr(not(feature = "include-locations"), serde(skip_serializing))]
11    pub body_close_span: Option<Span>,
12    pub parameters: Parameters<'i>,
13    pub children: Vec<Element<'i>>,
14}
15
16#[derive(Debug, Clone, Serialize)]
17pub struct TableRowElement<'i> {
18    #[cfg_attr(not(feature = "include-locations"), serde(skip_serializing))]
19    pub span: Span,
20    #[cfg_attr(not(feature = "include-locations"), serde(skip_serializing))]
21    pub body_open_span: Option<Span>,
22    #[cfg_attr(not(feature = "include-locations"), serde(skip_serializing))]
23    pub body_close_span: Option<Span>,
24    pub parameters: Parameters<'i>,
25    pub children: Vec<Element<'i>>,
26}
27
28#[derive(Debug, Clone, Serialize)]
29pub struct TableColumnElement<'i> {
30    #[cfg_attr(not(feature = "include-locations"), serde(skip_serializing))]
31    pub span: Span,
32    #[cfg_attr(not(feature = "include-locations"), serde(skip_serializing))]
33    pub body_open_span: Option<Span>,
34    #[cfg_attr(not(feature = "include-locations"), serde(skip_serializing))]
35    pub body_close_span: Option<Span>,
36    pub parameters: Parameters<'i>,
37    pub children: Vec<Element<'i>>,
38}