Add source string to Span

This is the path to the location that this span is pointing to. This is
usually going to be a file path, but it can really be anything you want.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2022-01-16 14:40:09 -08:00
parent effa99e65d
commit 2752bdf6d3
5 changed files with 49 additions and 32 deletions

View File

@@ -64,9 +64,9 @@ impl<'s> Compile<'s> {
// TODO - is self.compile the right thing to do here?
let compiled = Rc::new(self.compile(stmts.clone()));
let locals = self.scope_stack.pop_scope().unwrap();
let quote = self
.quote_table
.insert(expr.span(), locals, stmts.clone(), compiled);
let quote =
self.quote_table
.insert(expr.span().clone(), locals, stmts.clone(), compiled);
Inst::PushValue(Value::Quote(quote)).into()
}
}