Implement Into for AstNode.
This commit is contained in:
parent
9111408d83
commit
df5d699a39
@ -11,6 +11,7 @@ use crate::types::DiarySexp;
|
|||||||
use crate::types::Document;
|
use crate::types::Document;
|
||||||
use crate::types::Drawer;
|
use crate::types::Drawer;
|
||||||
use crate::types::DynamicBlock;
|
use crate::types::DynamicBlock;
|
||||||
|
use crate::types::Element;
|
||||||
use crate::types::Entity;
|
use crate::types::Entity;
|
||||||
use crate::types::ExampleBlock;
|
use crate::types::ExampleBlock;
|
||||||
use crate::types::ExportBlock;
|
use crate::types::ExportBlock;
|
||||||
@ -28,6 +29,7 @@ use crate::types::Keyword;
|
|||||||
use crate::types::LatexEnvironment;
|
use crate::types::LatexEnvironment;
|
||||||
use crate::types::LatexFragment;
|
use crate::types::LatexFragment;
|
||||||
use crate::types::LineBreak;
|
use crate::types::LineBreak;
|
||||||
|
use crate::types::Object;
|
||||||
use crate::types::OrgMacro;
|
use crate::types::OrgMacro;
|
||||||
use crate::types::Paragraph;
|
use crate::types::Paragraph;
|
||||||
use crate::types::PlainLink;
|
use crate::types::PlainLink;
|
||||||
@ -108,3 +110,327 @@ pub enum AstNode<'r, 's> {
|
|||||||
Superscript(&'r Superscript<'s>),
|
Superscript(&'r Superscript<'s>),
|
||||||
Timestamp(&'r Timestamp<'s>),
|
Timestamp(&'r Timestamp<'s>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'r, 's> From<&'r Element<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Element<'s>) -> Self {
|
||||||
|
match value {
|
||||||
|
Element::Paragraph(inner) => inner.into(),
|
||||||
|
Element::PlainList(inner) => inner.into(),
|
||||||
|
Element::GreaterBlock(inner) => inner.into(),
|
||||||
|
Element::DynamicBlock(inner) => inner.into(),
|
||||||
|
Element::FootnoteDefinition(inner) => inner.into(),
|
||||||
|
Element::Comment(inner) => inner.into(),
|
||||||
|
Element::Drawer(inner) => inner.into(),
|
||||||
|
Element::PropertyDrawer(inner) => inner.into(),
|
||||||
|
Element::Table(inner) => inner.into(),
|
||||||
|
Element::VerseBlock(inner) => inner.into(),
|
||||||
|
Element::CommentBlock(inner) => inner.into(),
|
||||||
|
Element::ExampleBlock(inner) => inner.into(),
|
||||||
|
Element::ExportBlock(inner) => inner.into(),
|
||||||
|
Element::SrcBlock(inner) => inner.into(),
|
||||||
|
Element::Clock(inner) => inner.into(),
|
||||||
|
Element::DiarySexp(inner) => inner.into(),
|
||||||
|
Element::Planning(inner) => inner.into(),
|
||||||
|
Element::FixedWidthArea(inner) => inner.into(),
|
||||||
|
Element::HorizontalRule(inner) => inner.into(),
|
||||||
|
Element::Keyword(inner) => inner.into(),
|
||||||
|
Element::BabelCall(inner) => inner.into(),
|
||||||
|
Element::LatexEnvironment(inner) => inner.into(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'r, 's> From<&'r Object<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Object<'s>) -> Self {
|
||||||
|
match value {
|
||||||
|
Object::Bold(inner) => inner.into(),
|
||||||
|
Object::Italic(inner) => inner.into(),
|
||||||
|
Object::Underline(inner) => inner.into(),
|
||||||
|
Object::StrikeThrough(inner) => inner.into(),
|
||||||
|
Object::Code(inner) => inner.into(),
|
||||||
|
Object::Verbatim(inner) => inner.into(),
|
||||||
|
Object::PlainText(inner) => inner.into(),
|
||||||
|
Object::RegularLink(inner) => inner.into(),
|
||||||
|
Object::RadioLink(inner) => inner.into(),
|
||||||
|
Object::RadioTarget(inner) => inner.into(),
|
||||||
|
Object::PlainLink(inner) => inner.into(),
|
||||||
|
Object::AngleLink(inner) => inner.into(),
|
||||||
|
Object::OrgMacro(inner) => inner.into(),
|
||||||
|
Object::Entity(inner) => inner.into(),
|
||||||
|
Object::LatexFragment(inner) => inner.into(),
|
||||||
|
Object::ExportSnippet(inner) => inner.into(),
|
||||||
|
Object::FootnoteReference(inner) => inner.into(),
|
||||||
|
Object::Citation(inner) => inner.into(),
|
||||||
|
Object::CitationReference(inner) => inner.into(),
|
||||||
|
Object::InlineBabelCall(inner) => inner.into(),
|
||||||
|
Object::InlineSourceBlock(inner) => inner.into(),
|
||||||
|
Object::LineBreak(inner) => inner.into(),
|
||||||
|
Object::Target(inner) => inner.into(),
|
||||||
|
Object::StatisticsCookie(inner) => inner.into(),
|
||||||
|
Object::Subscript(inner) => inner.into(),
|
||||||
|
Object::Superscript(inner) => inner.into(),
|
||||||
|
Object::Timestamp(inner) => inner.into(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'r, 's> From<&'r Document<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Document<'s>) -> Self {
|
||||||
|
AstNode::Document(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Heading<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Heading<'s>) -> Self {
|
||||||
|
AstNode::Heading(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Section<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Section<'s>) -> Self {
|
||||||
|
AstNode::Section(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Paragraph<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Paragraph<'s>) -> Self {
|
||||||
|
AstNode::Paragraph(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r PlainList<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r PlainList<'s>) -> Self {
|
||||||
|
AstNode::PlainList(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r GreaterBlock<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r GreaterBlock<'s>) -> Self {
|
||||||
|
AstNode::GreaterBlock(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r DynamicBlock<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r DynamicBlock<'s>) -> Self {
|
||||||
|
AstNode::DynamicBlock(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r FootnoteDefinition<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r FootnoteDefinition<'s>) -> Self {
|
||||||
|
AstNode::FootnoteDefinition(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Comment<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Comment<'s>) -> Self {
|
||||||
|
AstNode::Comment(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Drawer<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Drawer<'s>) -> Self {
|
||||||
|
AstNode::Drawer(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r PropertyDrawer<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r PropertyDrawer<'s>) -> Self {
|
||||||
|
AstNode::PropertyDrawer(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Table<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Table<'s>) -> Self {
|
||||||
|
AstNode::Table(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r VerseBlock<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r VerseBlock<'s>) -> Self {
|
||||||
|
AstNode::VerseBlock(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r CommentBlock<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r CommentBlock<'s>) -> Self {
|
||||||
|
AstNode::CommentBlock(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r ExampleBlock<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r ExampleBlock<'s>) -> Self {
|
||||||
|
AstNode::ExampleBlock(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r ExportBlock<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r ExportBlock<'s>) -> Self {
|
||||||
|
AstNode::ExportBlock(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r SrcBlock<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r SrcBlock<'s>) -> Self {
|
||||||
|
AstNode::SrcBlock(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Clock<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Clock<'s>) -> Self {
|
||||||
|
AstNode::Clock(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r DiarySexp<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r DiarySexp<'s>) -> Self {
|
||||||
|
AstNode::DiarySexp(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Planning<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Planning<'s>) -> Self {
|
||||||
|
AstNode::Planning(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r FixedWidthArea<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r FixedWidthArea<'s>) -> Self {
|
||||||
|
AstNode::FixedWidthArea(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r HorizontalRule<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r HorizontalRule<'s>) -> Self {
|
||||||
|
AstNode::HorizontalRule(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Keyword<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Keyword<'s>) -> Self {
|
||||||
|
AstNode::Keyword(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r BabelCall<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r BabelCall<'s>) -> Self {
|
||||||
|
AstNode::BabelCall(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r LatexEnvironment<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r LatexEnvironment<'s>) -> Self {
|
||||||
|
AstNode::LatexEnvironment(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Bold<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Bold<'s>) -> Self {
|
||||||
|
AstNode::Bold(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Italic<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Italic<'s>) -> Self {
|
||||||
|
AstNode::Italic(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Underline<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Underline<'s>) -> Self {
|
||||||
|
AstNode::Underline(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r StrikeThrough<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r StrikeThrough<'s>) -> Self {
|
||||||
|
AstNode::StrikeThrough(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Code<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Code<'s>) -> Self {
|
||||||
|
AstNode::Code(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Verbatim<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Verbatim<'s>) -> Self {
|
||||||
|
AstNode::Verbatim(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r PlainText<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r PlainText<'s>) -> Self {
|
||||||
|
AstNode::PlainText(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r RegularLink<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r RegularLink<'s>) -> Self {
|
||||||
|
AstNode::RegularLink(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r RadioLink<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r RadioLink<'s>) -> Self {
|
||||||
|
AstNode::RadioLink(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r RadioTarget<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r RadioTarget<'s>) -> Self {
|
||||||
|
AstNode::RadioTarget(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r PlainLink<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r PlainLink<'s>) -> Self {
|
||||||
|
AstNode::PlainLink(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r AngleLink<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r AngleLink<'s>) -> Self {
|
||||||
|
AstNode::AngleLink(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r OrgMacro<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r OrgMacro<'s>) -> Self {
|
||||||
|
AstNode::OrgMacro(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Entity<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Entity<'s>) -> Self {
|
||||||
|
AstNode::Entity(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r LatexFragment<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r LatexFragment<'s>) -> Self {
|
||||||
|
AstNode::LatexFragment(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r ExportSnippet<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r ExportSnippet<'s>) -> Self {
|
||||||
|
AstNode::ExportSnippet(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r FootnoteReference<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r FootnoteReference<'s>) -> Self {
|
||||||
|
AstNode::FootnoteReference(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Citation<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Citation<'s>) -> Self {
|
||||||
|
AstNode::Citation(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r CitationReference<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r CitationReference<'s>) -> Self {
|
||||||
|
AstNode::CitationReference(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r InlineBabelCall<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r InlineBabelCall<'s>) -> Self {
|
||||||
|
AstNode::InlineBabelCall(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r InlineSourceBlock<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r InlineSourceBlock<'s>) -> Self {
|
||||||
|
AstNode::InlineSourceBlock(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r LineBreak<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r LineBreak<'s>) -> Self {
|
||||||
|
AstNode::LineBreak(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Target<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Target<'s>) -> Self {
|
||||||
|
AstNode::Target(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r StatisticsCookie<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r StatisticsCookie<'s>) -> Self {
|
||||||
|
AstNode::StatisticsCookie(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Subscript<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Subscript<'s>) -> Self {
|
||||||
|
AstNode::Subscript(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Superscript<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Superscript<'s>) -> Self {
|
||||||
|
AstNode::Superscript(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'r, 's> From<&'r Timestamp<'s>> for AstNode<'r, 's> {
|
||||||
|
fn from(value: &'r Timestamp<'s>) -> Self {
|
||||||
|
AstNode::Timestamp(value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,63 +1,73 @@
|
|||||||
|
use super::ast_node::AstNode;
|
||||||
use crate::types::Object;
|
use crate::types::Object;
|
||||||
|
|
||||||
pub enum AstNodeIter<'s> {
|
pub enum AstNodeIter<'r, 's> {
|
||||||
// Document Nodes
|
// Document Nodes
|
||||||
// Document(DocumentIter<'s>),
|
// Document(DocumentIter<'r, 's>),
|
||||||
// Heading(HeadingIter<'s>),
|
// Heading(HeadingIter<'r, 's>),
|
||||||
// Section(SectionIter<'s>),
|
// Section(SectionIter<'r, 's>),
|
||||||
// Elements
|
// Elements
|
||||||
// Paragraph(ParagraphIter<'s>),
|
// Paragraph(ParagraphIter<'r, 's>),
|
||||||
// PlainList(PlainListIter<'s>),
|
// PlainList(PlainListIter<'r, 's>),
|
||||||
// GreaterBlock(GreaterBlockIter<'s>),
|
// GreaterBlock(GreaterBlockIter<'r, 's>),
|
||||||
// DynamicBlock(DynamicBlockIter<'s>),
|
// DynamicBlock(DynamicBlockIter<'r, 's>),
|
||||||
// FootnoteDefinition(FootnoteDefinitionIter<'s>),
|
// FootnoteDefinition(FootnoteDefinitionIter<'r, 's>),
|
||||||
// Comment(CommentIter<'s>),
|
// Comment(CommentIter<'r, 's>),
|
||||||
// Drawer(DrawerIter<'s>),
|
// Drawer(DrawerIter<'r, 's>),
|
||||||
// PropertyDrawer(PropertyDrawerIter<'s>),
|
// PropertyDrawer(PropertyDrawerIter<'r, 's>),
|
||||||
// Table(TableIter<'s>),
|
// Table(TableIter<'r, 's>),
|
||||||
// VerseBlock(VerseBlockIter<'s>),
|
// VerseBlock(VerseBlockIter<'r, 's>),
|
||||||
// CommentBlock(CommentBlockIter<'s>),
|
// CommentBlock(CommentBlockIter<'r, 's>),
|
||||||
// ExampleBlock(ExampleBlockIter<'s>),
|
// ExampleBlock(ExampleBlockIter<'r, 's>),
|
||||||
// ExportBlock(ExportBlockIter<'s>),
|
// ExportBlock(ExportBlockIter<'r, 's>),
|
||||||
// SrcBlock(SrcBlockIter<'s>),
|
// SrcBlock(SrcBlockIter<'r, 's>),
|
||||||
// Clock(ClockIter<'s>),
|
// Clock(ClockIter<'r, 's>),
|
||||||
// DiarySexp(DiarySexpIter<'s>),
|
// DiarySexp(DiarySexpIter<'r, 's>),
|
||||||
// Planning(PlanningIter<'s>),
|
// Planning(PlanningIter<'r, 's>),
|
||||||
// FixedWidthArea(FixedWidthAreaIter<'s>),
|
// FixedWidthArea(FixedWidthAreaIter<'r, 's>),
|
||||||
// HorizontalRule(HorizontalRuleIter<'s>),
|
// HorizontalRule(HorizontalRuleIter<'r, 's>),
|
||||||
// Keyword(KeywordIter<'s>),
|
// Keyword(KeywordIter<'r, 's>),
|
||||||
// BabelCall(BabelCallIter<'s>),
|
// BabelCall(BabelCallIter<'r, 's>),
|
||||||
// LatexEnvironment(LatexEnvironmentIter<'s>),
|
// LatexEnvironment(LatexEnvironmentIter<'r, 's>),
|
||||||
// Objects
|
// Objects
|
||||||
Bold(BoldIter<'s>),
|
Bold(BoldIter<'r, 's>),
|
||||||
// Italic(ItalicIter<'s>),
|
// Italic(ItalicIter<'r, 's>),
|
||||||
// Underline(UnderlineIter<'s>),
|
// Underline(UnderlineIter<'r, 's>),
|
||||||
// StrikeThrough(StrikeThroughIter<'s>),
|
// StrikeThrough(StrikeThroughIter<'r, 's>),
|
||||||
// Code(CodeIter<'s>),
|
// Code(CodeIter<'r, 's>),
|
||||||
// Verbatim(VerbatimIter<'s>),
|
// Verbatim(VerbatimIter<'r, 's>),
|
||||||
// PlainText(PlainTextIter<'s>),
|
// PlainText(PlainTextIter<'r, 's>),
|
||||||
// RegularLink(RegularLinkIter<'s>),
|
// RegularLink(RegularLinkIter<'r, 's>),
|
||||||
// RadioLink(RadioLinkIter<'s>),
|
// RadioLink(RadioLinkIter<'r, 's>),
|
||||||
// RadioTarget(RadioTargetIter<'s>),
|
// RadioTarget(RadioTargetIter<'r, 's>),
|
||||||
// PlainLink(PlainLinkIter<'s>),
|
// PlainLink(PlainLinkIter<'r, 's>),
|
||||||
// AngleLink(AngleLinkIter<'s>),
|
// AngleLink(AngleLinkIter<'r, 's>),
|
||||||
// OrgMacro(OrgMacroIter<'s>),
|
// OrgMacro(OrgMacroIter<'r, 's>),
|
||||||
// Entity(EntityIter<'s>),
|
// Entity(EntityIter<'r, 's>),
|
||||||
// LatexFragment(LatexFragmentIter<'s>),
|
// LatexFragment(LatexFragmentIter<'r, 's>),
|
||||||
// ExportSnippet(ExportSnippetIter<'s>),
|
// ExportSnippet(ExportSnippetIter<'r, 's>),
|
||||||
// FootnoteReference(FootnoteReferenceIter<'s>),
|
// FootnoteReference(FootnoteReferenceIter<'r, 's>),
|
||||||
// Citation(CitationIter<'s>),
|
// Citation(CitationIter<'r, 's>),
|
||||||
// CitationReference(CitationReferenceIter<'s>),
|
// CitationReference(CitationReferenceIter<'r, 's>),
|
||||||
// InlineBabelCall(InlineBabelCallIter<'s>),
|
// InlineBabelCall(InlineBabelCallIter<'r, 's>),
|
||||||
// InlineSourceBlock(InlineSourceBlockIter<'s>),
|
// InlineSourceBlock(InlineSourceBlockIter<'r, 's>),
|
||||||
// LineBreak(LineBreakIter<'s>),
|
// LineBreak(LineBreakIter<'r, 's>),
|
||||||
// Target(TargetIter<'s>),
|
// Target(TargetIter<'r, 's>),
|
||||||
// StatisticsCookie(StatisticsCookieIter<'s>),
|
// StatisticsCookie(StatisticsCookieIter<'r, 's>),
|
||||||
// Subscript(SubscriptIter<'s>),
|
// Subscript(SubscriptIter<'r, 's>),
|
||||||
// Superscript(SuperscriptIter<'s>),
|
// Superscript(SuperscriptIter<'r, 's>),
|
||||||
// Timestamp(TimestampIter<'s>),
|
// Timestamp(TimestampIter<'r, 's>),
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct BoldIter<'s> {
|
pub struct BoldIter<'r, 's> {
|
||||||
next: std::slice::Iter<'s, Object<'s>>,
|
next: std::slice::Iter<'r, Object<'s>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'r, 's> Iterator for BoldIter<'r, 's> {
|
||||||
|
type Item = AstNode<'r, 's>;
|
||||||
|
|
||||||
|
fn next(&mut self) -> Option<Self::Item> {
|
||||||
|
let foo = self.next.next();
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user