Closed richardxia closed 1 year ago
Thanks, always glad to improve documentation.
One nitpick - if we already give an example with meta
, it should at least use that variable in some way? Even if just to add logger.info(f'mul at line {meta.line}')
or something of the sort.
No worries, just pushed up a new commit that adds an actual usage of the meta
argument: https://github.com/lark-parser/lark/pull/1302/commits/fc5da2209fce2338de9b2332192e683057389654
Thanks!
No problem, thank you!
When using
@v_args(meta=True)
, visitor methods will receive ameta
argument followed by achildren
argument in that order. The documentation previously described the arguments in the opposite order, which can be misleading to someone reading the docs, especially because there was no example of@v_args(meta=True)
.This updates the documentation to describe the arguments in the order they are passed in to the visitor methods, and adds a new example for
@v_args(meta=True)
.