seems to work as a first step.
macro genHedgeprop*(field: static seq[tuple[field:string,
fieldtype:string]]): void =
var source = """
type
HedgeProp* = object
"""
for f in field:
source &= " " & f.field & "*: " & f.fieldtype & "\n"
echo source
result = parseStmt(source)
macro genProperty*(field: static seq[tuple[field:string,
fieldtype:string]]): void =
var source = """
type
Property* = object
"""
for f in field:
source &= " " & f.field & "*: seq[" & f.fieldtype & "]\n"
echo source
result = parseStmt(source)
macro genMeshprop*(): void =
let source = """
type
MeshProp = object
mesh: Mesh
prop: Property
"""
Run