> Then when you are on the development branch of nim, error has a second
> optional argument, that allows you to pass a NimNode, so that positional
> information from that node gets printed on the cosole whe the error occurs.
I am using that now. Tnx.
Do you by the way know if Nim supports stat
> Nice to know this exists, but I want the switch / case / match to generate
> different code depending on the node-kind that is being passed.
Then when you are on the development branch of nim, `error` has a second
optional argument, that allows you to pass a NimNode, so that positional
inform
For comparison purposes, @Araq's second solution gives me
25 Count
272,765 Min
1,271,322 Mean
7,401,332 Max
1,503,168 StdDev
which over 25 tests is not much different to the first test.
> Does your own answer mean you already answered the question yourself?
Yes, the second post describes how I solved it.
> instead of this ... you can do this: definition.expectKind(nnkProcDef)
Nice to know this exists, but I want the switch / case / match to generate
different code depending on
I would really like to answer your question with yes, but I do not entirely
understand your question.
Does your own answer mean you already answered the question yourself?
Just one hint from me who already wrote a few more macros.
instead of this:
case definition.kind
of nnkPr
I like your frog.
@pwernersbach - That's a really cool project, and I'm glad that you shared it!
I love that you use the 'not nil' annotations for your argument types and type
definitions, and I've enjoyed reading through it, even though I'm not currently
using InfluxDB.
I hope you don't mind a few questions, bu
I managed to create a macro that creates a wrapper for functions that have the
"scriptExport" pragma. It was easier than I expected.
import macros
proc expandFormalParamsForCall(formalParamsNode: NimNode): seq[NimNode]
{.compileTime.} =
result = @[]
for i in 1 .
Is it possible to use Nimscript as an embedded scripting language instead of
for example using Lua? And if possible, can I create bindings for my own
functions and restrict which built-in functions can be called from the
scripting language?