Implement the rest of the elements.

This commit is contained in:
Tom Alexander
2023-09-27 18:55:50 -04:00
parent 95fa834420
commit c4ea3fbf88
2 changed files with 106 additions and 20 deletions

View File

@@ -31,6 +31,7 @@ use crate::types::Keyword;
use crate::types::LatexEnvironment;
use crate::types::LatexFragment;
use crate::types::LineBreak;
use crate::types::NodeProperty;
use crate::types::Object;
use crate::types::OrgMacro;
use crate::types::Paragraph;
@@ -50,6 +51,8 @@ use crate::types::StrikeThrough;
use crate::types::Subscript;
use crate::types::Superscript;
use crate::types::Table;
use crate::types::TableCell;
use crate::types::TableRow;
use crate::types::Target;
use crate::types::Timestamp;
use crate::types::Underline;
@@ -71,7 +74,9 @@ pub enum AstNode<'r, 's> {
Comment(&'r Comment<'s>),
Drawer(&'r Drawer<'s>),
PropertyDrawer(&'r PropertyDrawer<'s>),
NodeProperty(&'r NodeProperty<'s>),
Table(&'r Table<'s>),
TableRow(&'r TableRow<'s>),
VerseBlock(&'r VerseBlock<'s>),
CommentBlock(&'r CommentBlock<'s>),
ExampleBlock(&'r ExampleBlock<'s>),
@@ -112,6 +117,7 @@ pub enum AstNode<'r, 's> {
StatisticsCookie(&'r StatisticsCookie<'s>),
Subscript(&'r Subscript<'s>),
Superscript(&'r Superscript<'s>),
TableCell(&'r TableCell<'s>),
Timestamp(&'r Timestamp<'s>),
}
@@ -199,7 +205,9 @@ to_ast_node!(&'r FootnoteDefinition<'s>, AstNode::FootnoteDefinition);
to_ast_node!(&'r Comment<'s>, AstNode::Comment);
to_ast_node!(&'r Drawer<'s>, AstNode::Drawer);
to_ast_node!(&'r PropertyDrawer<'s>, AstNode::PropertyDrawer);
to_ast_node!(&'r NodeProperty<'s>, AstNode::NodeProperty);
to_ast_node!(&'r Table<'s>, AstNode::Table);
to_ast_node!(&'r TableRow<'s>, AstNode::TableRow);
to_ast_node!(&'r VerseBlock<'s>, AstNode::VerseBlock);
to_ast_node!(&'r CommentBlock<'s>, AstNode::CommentBlock);
to_ast_node!(&'r ExampleBlock<'s>, AstNode::ExampleBlock);
@@ -239,4 +247,5 @@ to_ast_node!(&'r Target<'s>, AstNode::Target);
to_ast_node!(&'r StatisticsCookie<'s>, AstNode::StatisticsCookie);
to_ast_node!(&'r Subscript<'s>, AstNode::Subscript);
to_ast_node!(&'r Superscript<'s>, AstNode::Superscript);
to_ast_node!(&'r TableCell<'s>, AstNode::TableCell);
to_ast_node!(&'r Timestamp<'s>, AstNode::Timestamp);