Move the sexp parser into the parser crate.
We need to parse sexp for diary sexp.
This commit is contained in:
parent
9d5b078c64
commit
7de72cab23
2
build.rs
2
build.rs
@ -61,7 +61,7 @@ fn write_header(test_file: &mut File) {
|
|||||||
use organic::compare_document;
|
use organic::compare_document;
|
||||||
use organic::parser::document;
|
use organic::parser::document;
|
||||||
use organic::emacs_parse_org_document;
|
use organic::emacs_parse_org_document;
|
||||||
use organic::sexp;
|
use organic::parser::sexp::sexp;
|
||||||
|
|
||||||
"#
|
"#
|
||||||
)
|
)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use super::sexp::Token;
|
|
||||||
use super::util::assert_bounds;
|
use super::util::assert_bounds;
|
||||||
use super::util::assert_name;
|
use super::util::assert_name;
|
||||||
|
use crate::parser::sexp::Token;
|
||||||
use crate::parser::Clock;
|
use crate::parser::Clock;
|
||||||
use crate::parser::Comment;
|
use crate::parser::Comment;
|
||||||
use crate::parser::CommentBlock;
|
use crate::parser::CommentBlock;
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
mod diff;
|
mod diff;
|
||||||
mod parse;
|
mod parse;
|
||||||
mod sexp;
|
|
||||||
mod util;
|
mod util;
|
||||||
pub use diff::compare_document;
|
pub use diff::compare_document;
|
||||||
pub use parse::emacs_parse_org_document;
|
pub use parse::emacs_parse_org_document;
|
||||||
pub use sexp::sexp;
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
|
use crate::parser::sexp::Token;
|
||||||
use crate::parser::Source;
|
use crate::parser::Source;
|
||||||
|
|
||||||
use super::sexp::Token;
|
|
||||||
|
|
||||||
/// Check if the child string slice is a slice of the parent string slice.
|
/// Check if the child string slice is a slice of the parent string slice.
|
||||||
fn is_slice_of(parent: &str, child: &str) -> bool {
|
fn is_slice_of(parent: &str, child: &str) -> bool {
|
||||||
let parent_start = parent.as_ptr() as usize;
|
let parent_start = parent.as_ptr() as usize;
|
||||||
|
@ -7,8 +7,6 @@ mod compare;
|
|||||||
pub use compare::compare_document;
|
pub use compare::compare_document;
|
||||||
#[cfg(feature = "compare")]
|
#[cfg(feature = "compare")]
|
||||||
pub use compare::emacs_parse_org_document;
|
pub use compare::emacs_parse_org_document;
|
||||||
#[cfg(feature = "compare")]
|
|
||||||
pub use compare::sexp;
|
|
||||||
|
|
||||||
mod error;
|
mod error;
|
||||||
pub mod parser;
|
pub mod parser;
|
||||||
|
@ -21,6 +21,7 @@ mod parser_with_context;
|
|||||||
mod plain_list;
|
mod plain_list;
|
||||||
mod plain_text;
|
mod plain_text;
|
||||||
mod property_drawer;
|
mod property_drawer;
|
||||||
|
pub mod sexp;
|
||||||
mod source;
|
mod source;
|
||||||
mod table;
|
mod table;
|
||||||
mod util;
|
mod util;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user