mirror of
https://github.com/Instagram/LibCST.git
synced 2025-12-23 10:35:53 +00:00
Implement a replace function.
This takes a tree, a matcher, and a replacement, replacing all nodes in the tree which match the shape of the matcher with the replacement.
This commit is contained in:
parent
c9b10fe427
commit
e4457425aa
6 changed files with 542 additions and 1 deletions
|
|
@ -33,6 +33,7 @@ selectively control when LibCST calls visitor functions.
|
|||
.. autofunction:: libcst.matchers.findall
|
||||
.. autofunction:: libcst.matchers.extract
|
||||
.. autofunction:: libcst.matchers.extractall
|
||||
.. autofunction:: libcst.matchers.replace
|
||||
|
||||
.. _libcst-matcher-decorators:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue