Skip to content

Commit

Permalink
fix 827 (#828)
Browse files Browse the repository at this point in the history
* #fix 827

* fmt
  • Loading branch information
domluna authored Apr 8, 2024
1 parent 19e6074 commit d959de1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/fst.jl
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,10 @@ function add_node!(
en.typ === MacroBlock ||
en.typ === SEMICOLON ||
# arg = @macro foo
en.typ === Kw && (en[end].typ === MacroCall || en[end].typ === MacroBlock)
en.typ === Kw && (en[end].typ === MacroCall || en[end].typ === MacroBlock) ||
# arg => @macro foo
en.typ === Binary && (en[end].typ === MacroCall || en[end].typ === MacroBlock)

# don't add trailing comma in these cases
elseif is_comma(en) && t.typ === TupleN && n_args(t.ref[]) == 1
# preserve comma
Expand Down

0 comments on commit d959de1

Please sign in to comment.