I've come across a problem where I have macro to define a grammar (similar
to how PEGParser currently works):
@grammar foo begin
rule[fn] = "some" + ("rule" | "test")
end
where the `[fn]` next to the rule defines a function to call on the results
(in this case it's an expansion). The issue is that parsing the Expr tree,
`fn` is given as a Symbol (which makes sense).
However, if I try to turn `fn` into a function I run into the namespace
issue I've had previously. If `fn` is defined in my module, it works
without problem. If it's defined in the code that imports the module, it
will not work because that function doesn't exist in the namespace of the
module.
I'm guessing there isn't an easy solution to fix this problem, but I
thought I'd check to see if someone had an idea.
Thanks!