diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-10-31 15:52:16 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-10-31 15:52:35 +0100 |
| commit | 5b344b663a3d224134923eea0d67ebf44c069b07 (patch) | |
| tree | 34a5fb464a38b9d4cb11294379b3ddf351dfce21 /src/library/mod.rs | |
| parent | feff013abb17f31bc5305fe77fe67cf615c19ff2 (diff) | |
Reorganize modules
Instead of separating functionality into layout and library, everything lives in the library now. This way, related things live side by side and there are no duplicate file names in the two directories.
Diffstat (limited to 'src/library/mod.rs')
| -rw-r--r-- | src/library/mod.rs | 48 |
1 files changed, 38 insertions, 10 deletions
diff --git a/src/library/mod.rs b/src/library/mod.rs index 6d3de11d..9a1dc2e9 100644 --- a/src/library/mod.rs +++ b/src/library/mod.rs @@ -3,26 +3,54 @@ //! Call [`new`] to obtain a [`Scope`] containing all standard library //! definitions. -mod elements; -mod layout; +mod align; +mod container; +mod deco; +mod grid; +mod image; +mod pad; +mod page; +mod par; +mod shape; +mod spacing; +mod stack; mod text; +mod transform; mod utility; -pub use elements::*; -pub use layout::*; +/// Helpful imports for creating library functionality. +mod prelude { + pub use std::rc::Rc; + + pub use crate::diag::{At, TypResult}; + pub use crate::eval::{Args, EvalContext, Str, Template, Value}; + pub use crate::frame::*; + pub use crate::geom::*; + pub use crate::layout::*; + pub use crate::syntax::{Span, Spanned}; + pub use crate::util::OptionExt; +} + +pub use self::image::*; +pub use align::*; +pub use container::*; +pub use deco::*; +pub use grid::*; +pub use pad::*; +pub use page::*; +pub use par::*; +pub use shape::*; +pub use spacing::*; +pub use stack::*; pub use text::*; +pub use transform::*; pub use utility::*; use std::convert::TryFrom; -use std::rc::Rc; -use crate::diag::{At, TypResult}; -use crate::eval::{Args, Array, EvalContext, Scope, Str, Template, Value}; +use crate::eval::{Scope, Value}; use crate::font::{FontFamily, FontStretch, FontStyle, FontWeight, VerticalFontMetric}; use crate::geom::*; -use crate::layout::{BlockLevel, Frame, InlineLevel, LayoutContext, Spacing}; -use crate::style::Style; -use crate::syntax::{Span, Spanned}; /// Construct a scope containing all standard library definitions. pub fn new() -> Scope { |
