summaryrefslogtreecommitdiff
path: root/src/library/mod.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-01-15 16:53:02 +0100
committerLaurenz <laurmaedje@gmail.com>2021-01-15 16:53:02 +0100
commitd763f0f5a6a700352ee8926c15c8e58624f705c9 (patch)
treed287edfdab9793a796404516c7313689e4e69964 /src/library/mod.rs
parent0f0416054f263b80ccec1a463ce4ab20913bdf71 (diff)
Split state and scopes, less ref-counting 🔀
Diffstat (limited to 'src/library/mod.rs')
-rw-r--r--src/library/mod.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/library/mod.rs b/src/library/mod.rs
index f9047fc6..5c4e774c 100644
--- a/src/library/mod.rs
+++ b/src/library/mod.rs
@@ -1,4 +1,7 @@
//! The standard library.
+//!
+//! Call [`new`] to obtain a [`Scope`] containing all standard library
+//! definitions.
mod extend;
mod insert;
@@ -15,8 +18,8 @@ use fontdock::{FontStretch, FontStyle, FontWeight};
use crate::eval::{Scope, ValueAny, ValueFunc};
use crate::geom::Dir;
-/// The scope containing the standard library.
-pub fn _std() -> Scope {
+/// Construct a scope containing all standard library definitions.
+pub fn new() -> Scope {
let mut std = Scope::new();
macro_rules! set {
(func: $name:expr, $func:expr) => {