Move the sexp parser into the parser crate.

We need to parse sexp for diary sexp.
This commit is contained in:
Tom Alexander 2023-04-21 20:32:51 -04:00
parent 9d5b078c64
commit 7de72cab23
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
7 changed files with 4 additions and 8 deletions

View File

@ -61,7 +61,7 @@ fn write_header(test_file: &mut File) {
use organic::compare_document;
use organic::parser::document;
use organic::emacs_parse_org_document;
use organic::sexp;
use organic::parser::sexp::sexp;
"#
)

View File

@ -1,6 +1,6 @@
use super::sexp::Token;
use super::util::assert_bounds;
use super::util::assert_name;
use crate::parser::sexp::Token;
use crate::parser::Clock;
use crate::parser::Comment;
use crate::parser::CommentBlock;

View File

@ -1,7 +1,5 @@
mod diff;
mod parse;
mod sexp;
mod util;
pub use diff::compare_document;
pub use parse::emacs_parse_org_document;
pub use sexp::sexp;

View File

@ -1,7 +1,6 @@
use crate::parser::sexp::Token;
use crate::parser::Source;
use super::sexp::Token;
/// Check if the child string slice is a slice of the parent string slice.
fn is_slice_of(parent: &str, child: &str) -> bool {
let parent_start = parent.as_ptr() as usize;

View File

@ -7,8 +7,6 @@ mod compare;
pub use compare::compare_document;
#[cfg(feature = "compare")]
pub use compare::emacs_parse_org_document;
#[cfg(feature = "compare")]
pub use compare::sexp;
mod error;
pub mod parser;

View File

@ -21,6 +21,7 @@ mod parser_with_context;
mod plain_list;
mod plain_text;
mod property_drawer;
pub mod sexp;
mod source;
mod table;
mod util;