Skip to content

Commit

Permalink
fix: sync with internal extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
morgante committed Mar 28, 2024
1 parent 542cca3 commit 122e363
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/core/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use crate::pattern::{
};
use anyhow::Result;
use marzano_language::target_language::TargetLanguage;
use marzano_util::analysis_logs::AnalysisLogs;
use marzano_util::{analysis_logs::AnalysisLogs, runtime::ExecutionContext};

pub trait Context {
fn pattern_definitions(&self) -> &[PatternDefinition];
Expand Down Expand Up @@ -50,4 +50,6 @@ pub trait Context {
fn language(&self) -> &TargetLanguage;

fn name(&self) -> Option<&str>;

fn runtime(&self) -> &ExecutionContext;
}
4 changes: 4 additions & 0 deletions crates/core/src/pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,10 @@ impl<'a> Context for MarzanoContext<'a> {
(self.runtime.exec_external)(code, param_names, input_bindings)
}

fn runtime(&self) -> &ExecutionContext {
self.runtime
}

// FIXME: Don't depend on Grit's file handling in context.
fn files(&self) -> &FileOwners {
self.files
Expand Down

0 comments on commit 122e363

Please sign in to comment.