Skip to content

Conversation

@skepppy
Copy link

@skepppy skepppy commented Aug 29, 2024

Related to issue #1457, rewording the documentation of v_args() to specify it is only applicable to Transformer classes.

@erezsh
Copy link
Member

erezsh commented Aug 29, 2024

I think we should avoid using the word visitor at all, when the Visitor class isn't involved, because it is confusing. I think it's best to just refer to them as callbacks, or transformer callbacks.

@erezsh erezsh changed the title Rephrase v_args() documentation to underline it is related to Transformer classes only Docs: Rephrase v_args() documentation to underline it only applies to Transformer classes Aug 29, 2024
@erezsh erezsh added the docs label Aug 29, 2024
@skepppy
Copy link
Author

skepppy commented Aug 29, 2024

I reworded it again, removing the references to visitor.

@erezsh erezsh merged commit 414e40f into lark-parser:master Aug 29, 2024
@erezsh
Copy link
Member

erezsh commented Aug 29, 2024

Thanks!

@nchammas
Copy link
Contributor

FYI v_args also works for Interpreters.

@nchammas
Copy link
Contributor

In addition to updating the docs, wouldn't it make sense to also have this decorator issue a runtime warning or even error out if used incorrectly on a Visitor?

@erezsh
Copy link
Member

erezsh commented Jul 12, 2025

Yes, that sounds like the right thing to do.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants