Open Asc2011 opened 1 year ago
i'd like to use the nim-parser as a lib. I noticed that NimNode seems almost identical to PNode which is used in nims parser modules. Finally you mentioned macros2 as a solution to use the familiar procs from std/macros during runtime.
Yep! It's still a bit hacky, but effectively wraps PNode to provide a NimNode similar to how Nim itself does.
Can i somehow make sure that the
nim/compiler-lib
that gets compiled is the same as the actual nim-compiler i'm using ?
Yes, you can add switch("path", "$nim")
to your config.nims file. For example https://github.com/elcritch/ants/blob/main/config.nims
Error: undeclared identifier: 'shallowCopy'
I'm not sure, but I think shallowCopy
should still be available? I believe that deepCopy
is unavailable with ARC/ORC thought.
Hi,
i'd like to use the nim-parser as a lib. I noticed that
NimNode
seems almost identical toPNode
which is used in nims parser modules. Finally you mentionedmacros2
as a solution to use the familiar procs fromstd/macros
during runtime. My task is pretty easy : i want to extract type-sections, basically all symbol-definitions from a nim-module. It adds editor support for any editor that allows to define a binary to scan thru a buffer and deliver a list of symbols. I usechoosenim devel
and installed vianimble install nim
and later tried withchoosenim stable
, too. I see a strange error-msg, originating in thenimble/compiler
-package(1400,10): Error: undeclared identifier: 'shallowCopy' Andsystem/shallowCopy
should be avail ? How can i get around this ? Can i somehow make sure that thenim/compiler-lib
that gets compiled is the same as the actual nim-compiler i'm using ? I'm on the discord-channel, too. greets Andreas