File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 14
14
function helper_namedtuples_replacement (ex)
15
15
return postwalk (ex) do x
16
16
if x isa Expr && x. head== :braces
17
- new_ex = Expr (:tuple , x. args... )
17
+ new_ex = Expr (:tuple , Expr ( :parameters , x. args... ) )
18
18
19
- for (j,field_in_NT) in enumerate (new_ex. args)
19
+ for (j,field_in_NT) in enumerate (new_ex. args[ 1 ] . args )
20
20
if isa (field_in_NT, Expr) && field_in_NT. head== :.
21
21
name_to_use = field_in_NT. args[2 ]. value
22
- new_ex. args[j] = Expr (:(= ), name_to_use, field_in_NT)
22
+ new_ex. args[1 ] . args[ j] = Expr (:(= ), name_to_use, field_in_NT)
23
23
elseif isa (field_in_NT, Symbol)
24
- new_ex. args[j] = Expr (:(= ), field_in_NT, field_in_NT)
24
+ new_ex. args[1 ] . args[ j] = Expr (:(= ), field_in_NT, field_in_NT)
25
25
end
26
26
end
27
27
You can’t perform that action at this time.
0 commit comments