-
-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Description
MWE:
using MacroTools
using MacroTools: textwalk
code = """
Rule(x -> -sin(x))
Rule(x -> 1 + tan(x)^2)
""";
after = textwalk(code) do expr
@capture(expr, Rule(v_)) && return v
return expr
end
println(after)
Output:
(x->begin
-(sin(x))
end)
(x->begin
1 + tan(x) ^ 2
end)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels