Skip to content

Commit

Permalink
fix inline index macro paren coloring
Browse files Browse the repository at this point in the history
  • Loading branch information
kaikalii committed Nov 6, 2024
1 parent ea41617 commit 4c3050c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/compile/modifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};

Expand Down Expand Up @@ -859,6 +859,7 @@ impl Compiler {
fn inline_macro(
&mut self,
func: Sp<Func>,
ident: Sp<Ident>,
span: CodeSpan,
operands: Vec<Sp<Word>>,
) -> UiuaResult<Node> {
Expand All @@ -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
Expand Down

0 comments on commit 4c3050c

Please sign in to comment.