Skip to content

Commit

Permalink
switched to use parse_i
Browse files Browse the repository at this point in the history
  • Loading branch information
drizk1 committed Sep 1, 2023
1 parent 52d3132 commit 4d551b6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/separate_unite.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,17 @@ $docstring_separate
macro separate(df, from, into, sep)
from_quoted = QuoteNode(from)

if @capture(into, (args__,)) || @capture(into, [args__])
interpolated_into, _, _ = parse_interpolation(into)

if @capture(interpolated_into, (args__,)) || @capture(interpolated_into, [args__])
args = QuoteNode.(args)
into_expr = :[$(args...)]
else
into_expr = quote
if typeof($into) <: Vector{String}
Symbol.($into)
if typeof($interpolated_into) <: Vector{String}
Symbol.($interpolated_into)
else
$into
$interpolated_into
end
end
end
Expand Down

0 comments on commit 4d551b6

Please sign in to comment.