diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-03-11 23:28:35 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-03-11 23:29:32 +0100 |
| commit | ca6edf5283c258d8410134d678347977cb273cdd (patch) | |
| tree | b2b46ba70c054b0cbdefa06edbc5fd999cddb1fa /src/eval | |
| parent | 1a390deaea040191cf0e5937bd8e1427b49db71b (diff) | |
Jump to source and preview
Diffstat (limited to 'src/eval')
| -rw-r--r-- | src/eval/func.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/eval/func.rs b/src/eval/func.rs index 26854240..a5fa6fa1 100644 --- a/src/eval/func.rs +++ b/src/eval/func.rs @@ -62,9 +62,11 @@ impl Func { self.1 } - /// Attach a span to the function. + /// Attach a span to this function if it doesn't already have one. pub fn spanned(mut self, span: Span) -> Self { - self.1 = span; + if self.1.is_detached() { + self.1 = span; + } self } |
