diff options
| author | frozolotl <44589151+frozolotl@users.noreply.github.com> | 2024-10-31 19:53:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-31 18:53:10 +0000 |
| commit | 753e59eaa0574b561a52627c4d1f88f50c845847 (patch) | |
| tree | 47bc095a6b1bdd1ac405c7383b5063fc02cac968 /crates | |
| parent | 1261d176b0d0eebe8aef117fb5929209f018f1fa (diff) | |
Make `Vm` attributes more public (#5148)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'crates')
| -rw-r--r-- | crates/typst-eval/src/flow.rs | 2 | ||||
| -rw-r--r-- | crates/typst-eval/src/lib.rs | 8 | ||||
| -rw-r--r-- | crates/typst-eval/src/vm.rs | 10 |
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> { |
