From 28b84aca844222c3dcccc3ef4b32bac6571ea881 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Fri, 29 Jan 2021 20:28:05 +0100 Subject: =?UTF-8?q?=CE=BB-names?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/compiler.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/compiler.rs') diff --git a/src/compiler.rs b/src/compiler.rs index 83dca4a..3c5498e 100644 --- a/src/compiler.rs +++ b/src/compiler.rs @@ -1,4 +1,4 @@ -use std::path::{Path, PathBuf}; +use std::{borrow::Cow, path::{Path, PathBuf}}; use std::rc::Rc; use std::cell::RefCell; use std::collections::HashMap; @@ -560,14 +560,14 @@ impl Compiler { let top = self.stack().len() - 1; let name = if !self.stack()[top].active { self.stack_mut()[top].active = true; - &self.stack()[top].name + Cow::Borrowed(&self.stack()[top].name) } else { - "anonumus function" + Cow::Owned(format!("λ {}@{:03}", self.current_file.display(), self.line())) }; let mut args = Vec::new(); let mut return_type = Type::Void; - let mut function_block = Block::new(name, &self.current_file, self.line()); + let mut function_block = Block::new(&name, &self.current_file, self.line()); let _ret = push_frame!(self, function_block, { loop { -- cgit v1.2.1