Skip to content

Commit

Permalink
feat: Add render tag
Browse files Browse the repository at this point in the history
  • Loading branch information
YuiYukihira authored and epage committed Jun 9, 2023
1 parent 680b5f3 commit 980cd00
Show file tree
Hide file tree
Showing 7 changed files with 846 additions and 3 deletions.
4 changes: 3 additions & 1 deletion crates/core/src/runtime/stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,14 @@ impl<P: super::Runtime, O: ObjectView> super::Runtime for StackFrame<P, O> {
}
}

pub(crate) struct GlobalFrame<P> {
/// A stack frame that only provides a sandboxed set of globals
pub struct GlobalFrame<P> {
parent: P,
data: std::cell::RefCell<Object>,
}

impl<P: super::Runtime> GlobalFrame<P> {
/// Override globals for `parent`
pub fn new(parent: P) -> Self {
Self {
parent,
Expand Down
2 changes: 2 additions & 0 deletions crates/lib/src/stdlib/tags/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ mod cycle_tag;
mod include_tag;
mod increment_tags;
mod interrupt_tags;
mod render_tag;

pub use self::assign_tag::AssignTag;
pub use self::cycle_tag::CycleTag;
Expand All @@ -11,3 +12,4 @@ pub use self::increment_tags::DecrementTag;
pub use self::increment_tags::IncrementTag;
pub use self::interrupt_tags::BreakTag;
pub use self::interrupt_tags::ContinueTag;
pub use self::render_tag::RenderTag;
Loading

0 comments on commit 980cd00

Please sign in to comment.