Document AST structure

This commit is contained in:
Alex Bethel 2021-11-27 20:30:50 -07:00
parent fb922193b1
commit 11681dcd5c

View file

@ -15,9 +15,11 @@ pub struct CodeBlock {
text: String, text: String,
} }
pub struct Emphasis { pub struct StyledText {
italic: bool, italic: bool,
bold: bool, bold: bool,
underline: bool,
color: Option<RGBA>,
text: String, text: String,
} }
@ -26,6 +28,14 @@ pub struct Blockquote {
text: String, text: String,
} }
pub enum Node {
Header(Header),
Paragraph(Vec<StyledText>),
HRule,
}
pub struct Document(Vec<Node>);
// TODO: able take care of lists i am too drunk for this tonight // TODO: able take care of lists i am too drunk for this tonight