Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pdeffebach committed Jun 26, 2024
1 parent bed917d commit 71f31cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/macros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,6 @@ write

function subset_helper(x, args...)
x, exprs, outer_flags, kw = get_df_args_kwargs(x, args...; wrap_byrow = false)

t = (fun_to_vec(ex; no_dest=true, outer_flags=outer_flags) for ex in exprs)
quote
$subset($x, $(t...); (skipmissing = true,)..., $(kw...))
Expand Down
10 changes: 5 additions & 5 deletions src/parsing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -545,20 +545,20 @@ function create_args_vector!(kw, arg; wrap_byrow::Bool=false)
end

# @astable means the whole block is one transformation

if arg isa Expr && arg.head == :block && !outer_flags[ASTABLE_SYM][]
x = MacroTools.rmlines(arg).args
kw = []
transforms = []
seen_kw = false
seen_kw = !isempty(kw)
for xi in x
if is_macro_head(xi, "@kwarg")
if seen_kw
throw(ArgumentError("@kwarg calls must be at end of block"))
end
kw_item = get_kw_from_macro_call(xi)
push!(kw, kw_item)
seen_kw = true
else
if seen_kw
throw(ArgumentError("@kwarg calls must be at end of block"))
end
push!(transforms, xi)
end
end
Expand Down

0 comments on commit 71f31cb

Please sign in to comment.