Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mention internal/external transformers in the documentation #1486

Merged
merged 2 commits into from
Nov 13, 2024

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
@@ -523,7 +523,7 @@ def v_args(inline: bool = False, meta: bool = False, tree: bool = False, wrapper

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