Fix lifetimes in the compare functions.

This commit is contained in:
Tom Alexander
2023-10-02 12:36:09 -04:00
parent c0555dec0b
commit ecd523fa8f
4 changed files with 163 additions and 8 deletions

View File

@@ -21,6 +21,7 @@ use crate::types::ExportSnippet;
use crate::types::FixedWidthArea;
use crate::types::FootnoteDefinition;
use crate::types::FootnoteReference;
use crate::types::GetStandardProperties;
use crate::types::GreaterBlock;
use crate::types::Heading;
use crate::types::HorizontalRule;
@@ -249,3 +250,66 @@ 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);
impl<'r, 's> GetStandardProperties<'s> for AstNode<'r, 's> {
fn get_standard_properties<'b>(&'b self) -> &'b dyn crate::types::StandardProperties<'s> {
match self {
AstNode::Document(_) => todo!(),
AstNode::Heading(_) => todo!(),
AstNode::Section(_) => todo!(),
AstNode::Paragraph(_) => todo!(),
AstNode::PlainList(_) => todo!(),
AstNode::PlainListItem(_) => todo!(),
AstNode::GreaterBlock(_) => todo!(),
AstNode::DynamicBlock(_) => todo!(),
AstNode::FootnoteDefinition(_) => todo!(),
AstNode::Comment(_) => todo!(),
AstNode::Drawer(_) => todo!(),
AstNode::PropertyDrawer(_) => todo!(),
AstNode::NodeProperty(_) => todo!(),
AstNode::Table(_) => todo!(),
AstNode::TableRow(_) => todo!(),
AstNode::VerseBlock(_) => todo!(),
AstNode::CommentBlock(_) => todo!(),
AstNode::ExampleBlock(_) => todo!(),
AstNode::ExportBlock(_) => todo!(),
AstNode::SrcBlock(_) => todo!(),
AstNode::Clock(_) => todo!(),
AstNode::DiarySexp(_) => todo!(),
AstNode::Planning(_) => todo!(),
AstNode::FixedWidthArea(_) => todo!(),
AstNode::HorizontalRule(_) => todo!(),
AstNode::Keyword(_) => todo!(),
AstNode::BabelCall(_) => todo!(),
AstNode::LatexEnvironment(_) => todo!(),
AstNode::Bold(_) => todo!(),
AstNode::Italic(_) => todo!(),
AstNode::Underline(_) => todo!(),
AstNode::StrikeThrough(_) => todo!(),
AstNode::Code(_) => todo!(),
AstNode::Verbatim(_) => todo!(),
AstNode::PlainText(_) => todo!(),
AstNode::RegularLink(_) => todo!(),
AstNode::RadioLink(_) => todo!(),
AstNode::RadioTarget(_) => todo!(),
AstNode::PlainLink(_) => todo!(),
AstNode::AngleLink(_) => todo!(),
AstNode::OrgMacro(_) => todo!(),
AstNode::Entity(_) => todo!(),
AstNode::LatexFragment(_) => todo!(),
AstNode::ExportSnippet(_) => todo!(),
AstNode::FootnoteReference(_) => todo!(),
AstNode::Citation(_) => todo!(),
AstNode::CitationReference(_) => todo!(),
AstNode::InlineBabelCall(_) => todo!(),
AstNode::InlineSourceBlock(_) => todo!(),
AstNode::LineBreak(_) => todo!(),
AstNode::Target(_) => todo!(),
AstNode::StatisticsCookie(_) => todo!(),
AstNode::Subscript(_) => todo!(),
AstNode::Superscript(_) => todo!(),
AstNode::TableCell(_) => todo!(),
AstNode::Timestamp(inner) => *inner,
}
}
}