diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-03-18 17:50:57 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-03-18 17:50:57 +0100 |
| commit | 5d475ae32ede2cc51e361734f186ff3d4372564a (patch) | |
| tree | a21d2fb755e89a35d1fd9d6ff365121d38a3ecf7 /src/eval/mod.rs | |
| parent | f2b0c5e08d7433d5a1780fee827da0f29c5bc136 (diff) | |
Attach parameter list span to function
Diffstat (limited to 'src/eval/mod.rs')
| -rw-r--r-- | src/eval/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/eval/mod.rs b/src/eval/mod.rs index e6da6cba..27ed85e5 100644 --- a/src/eval/mod.rs +++ b/src/eval/mod.rs @@ -158,7 +158,7 @@ pub fn eval_code_str( /// virtual machine is created for each module evaluation and function call. pub struct Vm<'a> { /// The underlying virtual typesetter. - vt: Vt<'a>, + pub vt: Vt<'a>, /// The language items. items: LangItems, /// The route of source ids the VM took to reach its current location. @@ -1153,7 +1153,7 @@ impl Eval for ast::Closure { let mut sink = None; // Collect parameters and an optional sink parameter. - for param in self.params() { + for param in self.params().children() { match param { ast::Param::Pos(name) => { params.push((name, None)); @@ -1180,7 +1180,7 @@ impl Eval for ast::Closure { body: self.body(), }; - Ok(Value::Func(Func::from(closure).spanned(self.span()))) + Ok(Value::Func(Func::from(closure).spanned(self.params().span()))) } } |
