Extending with DSL results in undeclared identifier error.
ZoomRmc opened this issue · comments
Zoom commented
Nim 1.4.2
Using the example from Readme:
zfInline filter(cond: bool):
loop:
if cond:
yield it # add the current iterator to the resulting collection
Results in:
zero_functional.nim(959, 24) Error: undeclared identifier: 'newIdentNode'
Michael Schulte commented
you could add
import macros
Zoom commented
Thanks, this was not clear from the docs.
Also, the note about registering the extension with zfCreateExtension
should probably be moved to the top of the section and not omitted from at least the first example.
Michael Schulte commented
would have been an opportunity to do a PR - but well...
@ZoomRmc updated documentation - closing this one
Zoom commented
Sorry, I'm to new to the library to be aware of any consequences of messing with the docs/the code yet.