parent
f32ffb6ed8
commit
4f118721be
5 changed files with 90 additions and 19 deletions
|
|
@ -28,6 +28,10 @@ proc toLit*[T](a: T): PNode =
|
|||
elif T is tuple:
|
||||
result = newTree(nkTupleConstr)
|
||||
for ai in fields(a): result.add toLit(ai)
|
||||
elif T is seq:
|
||||
result = newNode(nkBracket)
|
||||
for ai in a:
|
||||
result.add toLit(ai)
|
||||
elif T is object:
|
||||
result = newTree(nkObjConstr)
|
||||
result.add(newNode(nkEmpty))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue