iffy / nim-argparse

Argument parsing for Nim
MIT License
120 stars 8 forks source link

Request: forward facing object/variable with components defined in newParser() #66

Open casey-SK opened 3 years ago

casey-SK commented 3 years ago

I am trying to implement something similar to ArgDoc, but unfortunately I am pretty novice and macros and templates still baffle me. I wanted to get an object/sequence/something that contained all of the components after I defined them in the newParser template.

I see you have the Builder object and the BuilderStack, and I tried playing around with those, without success.

Any help/suggestions greatly appreciated!

casey-SK commented 3 years ago

I see that builderStack is a {.compileTime.} variable. I was trying to create a const using something like

const b = builderStack[^1]

but since the Builder object is a ref, it does not want to work...