Skip to content

Commit

Permalink
Merge pull request #1486 from odanoburu/issue408
Browse files Browse the repository at this point in the history
Mention internal/external transformers in the documentation
  • Loading branch information
erezsh authored Nov 13, 2024
2 parents 24f19a3 + aeeef0a commit 2f7c9a4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lark/parse_tree_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def f(children):

def apply_visit_wrapper(func, name, wrapper):
if wrapper is _vargs_meta or wrapper is _vargs_meta_inline:
raise NotImplementedError("Meta args not supported for internal transformer")
raise NotImplementedError("Meta args not supported for internal transformer; use YourTransformer().transform(parser.parse()) instead")

@wraps(func)
def f(children):
Expand Down
2 changes: 1 addition & 1 deletion lark/visitors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`` isn't available for transformers supplied to Lark using the ``transformer`` parameter (aka internal transformers).
tree (bool, optional): Provides the entire tree as the argument, instead of the children.
wrapper (function, optional): Provide a function to decorate all methods.
Expand Down

0 comments on commit 2f7c9a4

Please sign in to comment.