Skip to content

Conversation

@odanoburu
Copy link
Contributor

Helps users not fall into a problem similar to #408 — which I recently did.

I'm sure the actual text could be improved; feel free to modify it to taste, but I do think it would be helpful to have this or something similar in the docs. Thanks for the library!

Helps users not fall into a problem similar to lark-parser#408.
lark/visitors.py Outdated
Parameters:
inline (bool, optional): Children are provided as ``*args`` instead of a list argument (not recommended for very long lists).
meta (bool, optional): Provides two arguments: ``meta`` and ``children`` (instead of just the latter)
meta (bool, optional): Provides two arguments: ``meta`` and ``children`` (instead of just the latter); ``meta`` is only available for external transformers (i.e., those not supplied as ``Lark``'s ``transformer`` parameter).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if we phrase it as

``meta`` isn't available for transformers supplied to Lark using the ``transformer`` parameter (aka internal transformers).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certainly sounds better/is more direct. I've changed it!

@erezsh erezsh merged commit 2f7c9a4 into lark-parser:master Nov 13, 2024
9 checks passed
@erezsh
Copy link
Member

erezsh commented Nov 13, 2024

Thanks for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants