Finish implementing AstNodeIter for all types.
This commit is contained in:
parent
c4ea3fbf88
commit
875a50ae46
@ -4,8 +4,11 @@ use super::ast_node::AstNode;
|
|||||||
use super::macros::children_iter;
|
use super::macros::children_iter;
|
||||||
use super::macros::empty_iter;
|
use super::macros::empty_iter;
|
||||||
use super::macros::multi_field_iter;
|
use super::macros::multi_field_iter;
|
||||||
|
use crate::types::AngleLink;
|
||||||
use crate::types::BabelCall;
|
use crate::types::BabelCall;
|
||||||
use crate::types::Bold;
|
use crate::types::Bold;
|
||||||
|
use crate::types::Citation;
|
||||||
|
use crate::types::CitationReference;
|
||||||
use crate::types::Clock;
|
use crate::types::Clock;
|
||||||
use crate::types::Code;
|
use crate::types::Code;
|
||||||
use crate::types::Comment;
|
use crate::types::Comment;
|
||||||
@ -16,32 +19,47 @@ use crate::types::DocumentElement;
|
|||||||
use crate::types::Drawer;
|
use crate::types::Drawer;
|
||||||
use crate::types::DynamicBlock;
|
use crate::types::DynamicBlock;
|
||||||
use crate::types::Element;
|
use crate::types::Element;
|
||||||
|
use crate::types::Entity;
|
||||||
use crate::types::ExampleBlock;
|
use crate::types::ExampleBlock;
|
||||||
use crate::types::ExportBlock;
|
use crate::types::ExportBlock;
|
||||||
|
use crate::types::ExportSnippet;
|
||||||
use crate::types::FixedWidthArea;
|
use crate::types::FixedWidthArea;
|
||||||
use crate::types::FootnoteDefinition;
|
use crate::types::FootnoteDefinition;
|
||||||
|
use crate::types::FootnoteReference;
|
||||||
use crate::types::GreaterBlock;
|
use crate::types::GreaterBlock;
|
||||||
use crate::types::Heading;
|
use crate::types::Heading;
|
||||||
use crate::types::HorizontalRule;
|
use crate::types::HorizontalRule;
|
||||||
|
use crate::types::InlineBabelCall;
|
||||||
|
use crate::types::InlineSourceBlock;
|
||||||
use crate::types::Italic;
|
use crate::types::Italic;
|
||||||
use crate::types::Keyword;
|
use crate::types::Keyword;
|
||||||
use crate::types::LatexEnvironment;
|
use crate::types::LatexEnvironment;
|
||||||
|
use crate::types::LatexFragment;
|
||||||
|
use crate::types::LineBreak;
|
||||||
use crate::types::NodeProperty;
|
use crate::types::NodeProperty;
|
||||||
use crate::types::Object;
|
use crate::types::Object;
|
||||||
|
use crate::types::OrgMacro;
|
||||||
use crate::types::Paragraph;
|
use crate::types::Paragraph;
|
||||||
|
use crate::types::PlainLink;
|
||||||
use crate::types::PlainList;
|
use crate::types::PlainList;
|
||||||
use crate::types::PlainListItem;
|
use crate::types::PlainListItem;
|
||||||
use crate::types::PlainText;
|
use crate::types::PlainText;
|
||||||
use crate::types::Planning;
|
use crate::types::Planning;
|
||||||
use crate::types::PropertyDrawer;
|
use crate::types::PropertyDrawer;
|
||||||
use crate::types::RadioLink;
|
use crate::types::RadioLink;
|
||||||
|
use crate::types::RadioTarget;
|
||||||
use crate::types::RegularLink;
|
use crate::types::RegularLink;
|
||||||
use crate::types::Section;
|
use crate::types::Section;
|
||||||
use crate::types::SrcBlock;
|
use crate::types::SrcBlock;
|
||||||
|
use crate::types::StatisticsCookie;
|
||||||
use crate::types::StrikeThrough;
|
use crate::types::StrikeThrough;
|
||||||
|
use crate::types::Subscript;
|
||||||
|
use crate::types::Superscript;
|
||||||
use crate::types::Table;
|
use crate::types::Table;
|
||||||
use crate::types::TableCell;
|
use crate::types::TableCell;
|
||||||
use crate::types::TableRow;
|
use crate::types::TableRow;
|
||||||
|
use crate::types::Target;
|
||||||
|
use crate::types::Timestamp;
|
||||||
use crate::types::Underline;
|
use crate::types::Underline;
|
||||||
use crate::types::Verbatim;
|
use crate::types::Verbatim;
|
||||||
use crate::types::VerseBlock;
|
use crate::types::VerseBlock;
|
||||||
@ -92,25 +110,25 @@ pub enum AstNodeIter<'r, 's> {
|
|||||||
PlainText(PlainTextIter<'r, 's>),
|
PlainText(PlainTextIter<'r, 's>),
|
||||||
RegularLink(RegularLinkIter<'r, 's>),
|
RegularLink(RegularLinkIter<'r, 's>),
|
||||||
RadioLink(RadioLinkIter<'r, 's>),
|
RadioLink(RadioLinkIter<'r, 's>),
|
||||||
// RadioTarget(RadioTargetIter<'r, 's>),
|
RadioTarget(RadioTargetIter<'r, 's>),
|
||||||
// PlainLink(PlainLinkIter<'r, 's>),
|
PlainLink(PlainLinkIter<'r, 's>),
|
||||||
// AngleLink(AngleLinkIter<'r, 's>),
|
AngleLink(AngleLinkIter<'r, 's>),
|
||||||
// OrgMacro(OrgMacroIter<'r, 's>),
|
OrgMacro(OrgMacroIter<'r, 's>),
|
||||||
// Entity(EntityIter<'r, 's>),
|
Entity(EntityIter<'r, 's>),
|
||||||
// LatexFragment(LatexFragmentIter<'r, 's>),
|
LatexFragment(LatexFragmentIter<'r, 's>),
|
||||||
// ExportSnippet(ExportSnippetIter<'r, 's>),
|
ExportSnippet(ExportSnippetIter<'r, 's>),
|
||||||
// FootnoteReference(FootnoteReferenceIter<'r, 's>),
|
FootnoteReference(FootnoteReferenceIter<'r, 's>),
|
||||||
// Citation(CitationIter<'r, 's>),
|
Citation(CitationIter<'r, 's>),
|
||||||
// CitationReference(CitationReferenceIter<'r, 's>),
|
CitationReference(CitationReferenceIter<'r, 's>),
|
||||||
// InlineBabelCall(InlineBabelCallIter<'r, 's>),
|
InlineBabelCall(InlineBabelCallIter<'r, 's>),
|
||||||
// InlineSourceBlock(InlineSourceBlockIter<'r, 's>),
|
InlineSourceBlock(InlineSourceBlockIter<'r, 's>),
|
||||||
// LineBreak(LineBreakIter<'r, 's>),
|
LineBreak(LineBreakIter<'r, 's>),
|
||||||
// Target(TargetIter<'r, 's>),
|
Target(TargetIter<'r, 's>),
|
||||||
// StatisticsCookie(StatisticsCookieIter<'r, 's>),
|
StatisticsCookie(StatisticsCookieIter<'r, 's>),
|
||||||
// Subscript(SubscriptIter<'r, 's>),
|
Subscript(SubscriptIter<'r, 's>),
|
||||||
// Superscript(SuperscriptIter<'r, 's>),
|
Superscript(SuperscriptIter<'r, 's>),
|
||||||
TableCell(TableCellIter<'r, 's>),
|
TableCell(TableCellIter<'r, 's>),
|
||||||
// Timestamp(TimestampIter<'r, 's>),
|
Timestamp(TimestampIter<'r, 's>),
|
||||||
}
|
}
|
||||||
|
|
||||||
multi_field_iter!(
|
multi_field_iter!(
|
||||||
@ -215,8 +233,35 @@ children_iter!(
|
|||||||
RadioLinkIter,
|
RadioLinkIter,
|
||||||
std::slice::Iter<'r, Object<'s>>
|
std::slice::Iter<'r, Object<'s>>
|
||||||
);
|
);
|
||||||
|
children_iter!(
|
||||||
|
RadioTarget<'s>,
|
||||||
|
RadioTargetIter,
|
||||||
|
std::slice::Iter<'r, Object<'s>>
|
||||||
|
);
|
||||||
|
empty_iter!(PlainLink<'s>, PlainLinkIter);
|
||||||
|
empty_iter!(AngleLink<'s>, AngleLinkIter);
|
||||||
|
empty_iter!(OrgMacro<'s>, OrgMacroIter);
|
||||||
|
empty_iter!(Entity<'s>, EntityIter);
|
||||||
|
empty_iter!(LatexFragment<'s>, LatexFragmentIter);
|
||||||
|
empty_iter!(ExportSnippet<'s>, ExportSnippetIter);
|
||||||
|
multi_field_iter!(
|
||||||
|
FootnoteReference<'s>,
|
||||||
|
FootnoteReferenceIter,
|
||||||
|
definition,
|
||||||
|
std::slice::Iter<'r, Object<'s>>,
|
||||||
|
);
|
||||||
|
empty_iter!(Citation<'s>, CitationIter);
|
||||||
|
empty_iter!(CitationReference<'s>, CitationReferenceIter);
|
||||||
|
empty_iter!(InlineBabelCall<'s>, InlineBabelCallIter);
|
||||||
|
empty_iter!(InlineSourceBlock<'s>, InlineSourceBlockIter);
|
||||||
|
empty_iter!(LineBreak<'s>, LineBreakIter);
|
||||||
|
empty_iter!(Target<'s>, TargetIter);
|
||||||
|
empty_iter!(StatisticsCookie<'s>, StatisticsCookieIter);
|
||||||
|
empty_iter!(Subscript<'s>, SubscriptIter);
|
||||||
|
empty_iter!(Superscript<'s>, SuperscriptIter);
|
||||||
children_iter!(
|
children_iter!(
|
||||||
TableCell<'s>,
|
TableCell<'s>,
|
||||||
TableCellIter,
|
TableCellIter,
|
||||||
std::slice::Iter<'r, Object<'s>>
|
std::slice::Iter<'r, Object<'s>>
|
||||||
);
|
);
|
||||||
|
empty_iter!(Timestamp<'s>, TimestampIter);
|
||||||
|
Loading…
Reference in New Issue
Block a user