Hi, I am working on macro that should generate a derivative calculation, for a
funtion
proc f1(x, y: float): float {.noSideEffect.} =
generates
proc f1_aad(x,y: float): float
that computes derivative of f1 at point x,y.
The difficulty I am having that Nim has so many ways to present the same thing.
Internally, I don't care whether function was called using command syntax, dot
syntax or infix operator or something else. Just want to know what function was
called and whether it has known derivative.
So I would like to simplify/normalize AST proc body representation before
walking it. So all possibilities collapse to a single presentation, though I
need all resolved symbol to stay. Is there a ready made solution available for
AST simplification?