I face the same limitation and just implemented a typeDef macro in my
constructor package to get around it, resuling in a DSL that looks like.
import ../src/constructor
typeDef(Test, true):
a b = int
d = seq[int]:
get(true):
test.dBacker
set(true): #In setters value is the input value
if value.len >= 1:
test.dBacker = value[0..2]
var a = Test()
a.d = @[100, 200, 300, 400]
assert a.d == @[100 ,200, 300] #Means the Setter did the job
Run
- How to use a custom pragma on an object to generates procs? treeform
- How to use a custom pragma on an object to generates p... xigoi
- How to use a custom pragma on an object to generat... treeform
- How to use a custom pragma on an object to gen... juancarlospaco
- How to use a custom pragma on an object to... timothee
- How to use a custom pragma on an obje... treeform
- How to use a custom pragma on an ... ElegantBeef
