From 4c3050ce9e2975331e8e623894921976437c41a4 Mon Sep 17 00:00:00 2001 From: Kai Schmidt Date: Tue, 5 Nov 2024 16:42:13 -0800 Subject: [PATCH] fix inline index macro paren coloring --- src/compile/modifier.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/compile/modifier.rs b/src/compile/modifier.rs index 15d8e6570..1dae4b8ff 100644 --- a/src/compile/modifier.rs +++ b/src/compile/modifier.rs @@ -365,8 +365,8 @@ impl Compiler { Modifier::Ref(r) => { return self.modifier_ref(r, modified.modifier.span, modified.operands) } - Modifier::Macro(_, func) => { - return self.inline_macro(func, modified.modifier.span, modified.operands); + Modifier::Macro(ident, func) => { + return self.inline_macro(func, ident, modified.modifier.span, modified.operands); } }; @@ -859,6 +859,7 @@ impl Compiler { fn inline_macro( &mut self, func: Sp, + ident: Sp, span: CodeSpan, operands: Vec>, ) -> UiuaResult { @@ -874,7 +875,7 @@ impl Compiler { // Track self.code_meta .inline_macros - .insert(func.span, operands.len()); + .insert(func.span, ident_modifier_args(&ident.value)); // Expand self.expand_index_macro(None, &mut words, operands, span.clone(), true)?; // Compile