I would like to pass configuration parameters to a macro. I already have a procedure that produce a string of Nimrod code based on these parameters (a tuple of sequences). I know that I can pass a string and convert it with strVal (as shown the answer https://stackoverflow.com/a/19956317/334703). Can I do the same with more complex data?
Alternatively can I use this string of Nimrod code in a compile-time procedure with a call to a procedure such as parseStmt?
EDIT: The generation of Nimrod code was useful to test my ideas bit I agree I should probably generate AST directly.
Here is an example of the structure I'm thinking about.
type
Tconfig = tuple
letters: seq[string]
numbers:seq[int]
var
data = (@("aa", "bb"), @(11, 22))
macro mymacro(data: Tconfig): stmt =
...