summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/typst-eval/src/flow.rs2
-rw-r--r--crates/typst-eval/src/lib.rs8
-rw-r--r--crates/typst-eval/src/vm.rs10
3 files changed, 10 insertions, 10 deletions
diff --git a/crates/typst-eval/src/flow.rs b/crates/typst-eval/src/flow.rs
index 5c9d2a00..231e6899 100644
--- a/crates/typst-eval/src/flow.rs
+++ b/crates/typst-eval/src/flow.rs
@@ -11,7 +11,7 @@ const MAX_ITERATIONS: usize = 10_000;
/// A control flow event that occurred during evaluation.
#[derive(Debug, Clone, PartialEq)]
-pub(crate) enum FlowEvent {
+pub enum FlowEvent {
/// Stop iteration in a loop.
Break(Span),
/// Skip the remainder of the current iteration in a loop.
diff --git a/crates/typst-eval/src/lib.rs b/crates/typst-eval/src/lib.rs
index a5c0c7e3..69c20e8c 100644
--- a/crates/typst-eval/src/lib.rs
+++ b/crates/typst-eval/src/lib.rs
@@ -14,14 +14,14 @@ mod methods;
mod rules;
mod vm;
-pub use self::call::*;
-pub use self::import::*;
-pub use self::vm::*;
+pub use self::call::{eval_closure, CapturesVisitor};
+pub use self::flow::FlowEvent;
+pub use self::import::import;
+pub use self::vm::Vm;
pub use typst_library::routines::EvalMode;
use self::access::*;
use self::binding::*;
-use self::flow::*;
use self::methods::*;
use comemo::{Track, Tracked, TrackedMut};
diff --git a/crates/typst-eval/src/vm.rs b/crates/typst-eval/src/vm.rs
index adf7dd76..a5cbb6fa 100644
--- a/crates/typst-eval/src/vm.rs
+++ b/crates/typst-eval/src/vm.rs
@@ -14,15 +14,15 @@ use crate::FlowEvent;
/// new virtual machine is created for each module evaluation and function call.
pub struct Vm<'a> {
/// The underlying virtual typesetter.
- pub(crate) engine: Engine<'a>,
+ pub engine: Engine<'a>,
/// A control flow event that is currently happening.
- pub(crate) flow: Option<FlowEvent>,
+ pub flow: Option<FlowEvent>,
/// The stack of scopes.
- pub(crate) scopes: Scopes<'a>,
+ pub scopes: Scopes<'a>,
/// A span that is currently under inspection.
- pub(crate) inspected: Option<Span>,
+ pub inspected: Option<Span>,
/// Data that is contextually made accessible to code behind the scenes.
- pub(crate) context: Tracked<'a, Context<'a>>,
+ pub context: Tracked<'a, Context<'a>>,
}
impl<'a> Vm<'a> {