diff --git a/build.rs b/build.rs index ea437d6..f365ebb 100644 --- a/build.rs +++ b/build.rs @@ -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; "# ) diff --git a/src/compare/diff.rs b/src/compare/diff.rs index 5c63d1c..0a48752 100644 --- a/src/compare/diff.rs +++ b/src/compare/diff.rs @@ -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; diff --git a/src/compare/mod.rs b/src/compare/mod.rs index 6b00e6d..4f8602a 100644 --- a/src/compare/mod.rs +++ b/src/compare/mod.rs @@ -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; diff --git a/src/compare/util.rs b/src/compare/util.rs index 830556a..2386943 100644 --- a/src/compare/util.rs +++ b/src/compare/util.rs @@ -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; diff --git a/src/lib.rs b/src/lib.rs index f5aac0b..d127623 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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; diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 5d97c93..76ef01b 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -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; diff --git a/src/compare/sexp.rs b/src/parser/sexp.rs similarity index 100% rename from src/compare/sexp.rs rename to src/parser/sexp.rs