Starting the greater block source.

This commit is contained in:
Tom Alexander 2023-04-03 17:36:56 -04:00
parent 9ad428bb20
commit 9e0bea4c3e
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
3 changed files with 5 additions and 0 deletions

View File

@ -1,4 +1,5 @@
use super::error::Res;
use super::greater_element::GreaterBlock;
use super::greater_element::PlainList;
use super::lesser_element::Paragraph;
use super::paragraph::paragraph;
@ -13,6 +14,7 @@ use nom::combinator::map;
pub enum Element<'s> {
Paragraph(Paragraph<'s>),
PlainList(PlainList<'s>),
GreaterBlock(GreaterBlock<'s>),
/// The whitespace that follows an element.
///
/// This isn't a real org-mode element. Except for items in plain lists, trailing blank lines belong to the preceding element. It is a separate `Element` in this enum to make parsing easier.
@ -24,6 +26,7 @@ impl<'s> Source<'s> for Element<'s> {
match self {
Element::Paragraph(obj) => obj.source,
Element::PlainList(obj) => obj.source,
Element::GreaterBlock(obj) => obj.source,
Element::TrailingWhitespace(src) => src,
}
}

View File

@ -0,0 +1 @@

View File

@ -1,6 +1,7 @@
mod document;
mod element;
mod error;
mod greater_block;
mod greater_element;
mod lesser_element;
mod list;