mirror of https://github.com/lark-parser/lark.git
Merge pull request #1486 from odanoburu/issue408
Mention internal/external transformers in the documentation
This commit is contained in:
commit
2f7c9a4e52
|
@ -320,7 +320,7 @@ def inplace_transformer(func):
|
|||
|
||||
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):
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
Loading…
Reference in New Issue