From c7735d935b0e2b45c710af84c7cb14b1664222a7 Mon Sep 17 00:00:00 2001 From: David Mak Date: Wed, 13 Dec 2023 13:26:14 +0800 Subject: [PATCH] standalone: Output id of undefined identifier --- nac3standalone/src/basic_symbol_resolver.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nac3standalone/src/basic_symbol_resolver.rs b/nac3standalone/src/basic_symbol_resolver.rs index cdc3575c..e483c6d6 100644 --- a/nac3standalone/src/basic_symbol_resolver.rs +++ b/nac3standalone/src/basic_symbol_resolver.rs @@ -64,7 +64,9 @@ impl SymbolResolver for Resolver { fn get_identifier_def(&self, id: StrRef) -> Result> { self.0.id_to_def.lock().get(&id).copied() - .ok_or_else(|| HashSet::from(["Undefined identifier".to_string()])) + .ok_or_else(|| HashSet::from([ + format!("Undefined identifier `{id}`"), + ])) } fn get_string_id(&self, s: &str) -> i32 {