diff --git a/liquid-compiler/src/lib.rs b/liquid-compiler/src/lib.rs index 518af3724..bb4014281 100644 --- a/liquid-compiler/src/lib.rs +++ b/liquid-compiler/src/lib.rs @@ -11,6 +11,7 @@ mod include; mod options; mod parser; mod tag; +mod text; pub mod error { pub use liquid_error::*; @@ -25,3 +26,5 @@ pub use include::*; pub use options::*; pub use parser::*; pub use tag::*; + +use text::Text; diff --git a/liquid-compiler/src/parser.rs b/liquid-compiler/src/parser.rs index ef0e5bad5..cc28653c9 100644 --- a/liquid-compiler/src/parser.rs +++ b/liquid-compiler/src/parser.rs @@ -7,7 +7,6 @@ use std; use liquid_interpreter::Expression; use liquid_interpreter::Renderable; -use liquid_interpreter::Text; use liquid_interpreter::Variable; use liquid_interpreter::{FilterCall, FilterChain}; use liquid_value::Scalar; @@ -17,6 +16,7 @@ use super::error::{Error, Result}; use super::LiquidOptions; use super::ParseBlock; use super::ParseTag; +use super::Text; use pest::Parser; diff --git a/liquid-interpreter/src/text.rs b/liquid-compiler/src/text.rs similarity index 75% rename from liquid-interpreter/src/text.rs rename to liquid-compiler/src/text.rs index 5f4b86bc5..e52f8a31c 100644 --- a/liquid-interpreter/src/text.rs +++ b/liquid-compiler/src/text.rs @@ -1,18 +1,18 @@ use std::io::Write; -use super::Context; -use super::Renderable; +use liquid_interpreter::Context; +use liquid_interpreter::Renderable; use error::{Result, ResultLiquidChainExt}; /// A raw template expression. #[derive(Clone, Debug, Eq, PartialEq)] -pub struct Text { +pub(crate) struct Text { text: String, } impl Text { /// Create a raw template expression. - pub fn new>(text: S) -> Text { + pub(crate) fn new>(text: S) -> Text { Text { text: text.into() } } } diff --git a/liquid-interpreter/src/lib.rs b/liquid-interpreter/src/lib.rs index 213666e06..a7afd6431 100644 --- a/liquid-interpreter/src/lib.rs +++ b/liquid-interpreter/src/lib.rs @@ -29,7 +29,6 @@ mod registry; mod renderable; mod stack; mod template; -mod text; mod variable; pub use self::context::*; @@ -41,5 +40,4 @@ pub use self::stack::*; pub use self::registry::*; pub use self::renderable::*; pub use self::template::*; -pub use self::text::*; pub use self::variable::*;