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:
Jennifer Taylor 2019-11-04 12:38:38 -08:00 committed by Jennifer Taylor
parent c9b10fe427
commit e4457425aa
6 changed files with 542 additions and 1 deletions

View file

@ -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: