diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-07 12:10:52 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-07 12:10:52 +0100 |
| commit | 1d5bf56e585c659ed7975cdf6cdfc9c67c29998d (patch) | |
| tree | 7ebe6e2d99869c5d91b00dcf85c8b54b8865cb84 /library/src/lib.rs | |
| parent | a0674990d3c318bb2e42e4d5fad66ea5477a54bf (diff) | |
Remove basics section
Diffstat (limited to 'library/src/lib.rs')
| -rw-r--r-- | library/src/lib.rs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/library/src/lib.rs b/library/src/lib.rs index a195c717..412ebd41 100644 --- a/library/src/lib.rs +++ b/library/src/lib.rs @@ -1,6 +1,5 @@ //! Typst's standard library. -pub mod basics; pub mod compute; pub mod layout; pub mod math; @@ -28,13 +27,6 @@ pub fn build() -> Library { fn global(math: Module, calc: Module) -> Module { let mut global = Scope::deduplicating(); - // Basics. - global.def_func::<basics::HeadingNode>("heading"); - global.def_func::<basics::ListNode>("list"); - global.def_func::<basics::EnumNode>("enum"); - global.def_func::<basics::TermsNode>("terms"); - global.def_func::<basics::TableNode>("table"); - // Text. global.def_func::<text::TextNode>("text"); global.def_func::<text::LinebreakNode>("linebreak"); @@ -63,6 +55,10 @@ fn global(math: Module, calc: Module) -> Module { global.def_func::<layout::HNode>("h"); global.def_func::<layout::BoxNode>("box"); global.def_func::<layout::BlockNode>("block"); + global.def_func::<layout::ListNode>("list"); + global.def_func::<layout::EnumNode>("enum"); + global.def_func::<layout::TermsNode>("terms"); + global.def_func::<layout::TableNode>("table"); global.def_func::<layout::StackNode>("stack"); global.def_func::<layout::GridNode>("grid"); global.def_func::<layout::ColumnsNode>("columns"); @@ -89,6 +85,7 @@ fn global(math: Module, calc: Module) -> Module { global.def_func::<meta::RefNode>("ref"); global.def_func::<meta::LinkNode>("link"); global.def_func::<meta::OutlineNode>("outline"); + global.def_func::<meta::HeadingNode>("heading"); // Symbols. global.define("sym", symbols::sym()); @@ -185,11 +182,11 @@ fn items() -> LangItems { }, link: |url| meta::LinkNode::from_url(url).pack(), ref_: |target| meta::RefNode(target).pack(), - heading: |level, body| basics::HeadingNode { level, title: body }.pack(), + heading: |level, body| meta::HeadingNode { level, title: body }.pack(), list_item: |body| layout::ListItem::List(body).pack(), enum_item: |number, body| layout::ListItem::Enum(number, body).pack(), term_item: |term, description| { - layout::ListItem::Term(basics::TermItem { term, description }).pack() + layout::ListItem::Term(layout::TermItem { term, description }).pack() }, formula: |body, block| math::FormulaNode { body, block }.pack(), math_align_point: || math::AlignPointNode.pack(), |
