summaryrefslogtreecommitdiff
path: root/src/eval/machine.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/eval/machine.rs')
-rw-r--r--src/eval/machine.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/eval/machine.rs b/src/eval/machine.rs
index 14633978..904a64c8 100644
--- a/src/eval/machine.rs
+++ b/src/eval/machine.rs
@@ -13,6 +13,8 @@ pub struct Machine<'a> {
pub ctx: &'a mut Context,
/// The route of source ids at which the machine is located.
pub route: Vec<SourceId>,
+ /// The dependencies of the current evaluation process.
+ pub deps: Vec<(SourceId, usize)>,
/// The stack of scopes.
pub scopes: Scopes<'a>,
/// A control flow event that is currently happening.
@@ -22,7 +24,13 @@ pub struct Machine<'a> {
impl<'a> Machine<'a> {
/// Create a new virtual machine.
pub fn new(ctx: &'a mut Context, route: Vec<SourceId>, scopes: Scopes<'a>) -> Self {
- Self { ctx, route, scopes, flow: None }
+ Self {
+ ctx,
+ route,
+ deps: vec![],
+ scopes,
+ flow: None,
+ }
}
/// Resolve a user-entered path to be relative to the compilation