LibCST/docs/source
Benjamin Woodruff 88ac18872c Add a reentrant (incremental) codegen API
**Context:** This is an experimental performance optimization that we're
hoping to use for our internal linter at Instagram. I added some
documentation, but it's unsupported, and isn't very user-friendly.

This adds `ExperimentalReentrantCodegenProvider`, which tracks the
codegen's internal state (indentation level, character offsets,
encoding, etc.) and for each statement, it stores a `CodegenPartial`
object.

The `CodegenPartial` object has enough information about the previous
codegen pass to run the codegen on part of a tree and patch the result
back into the original module's string.

In cases where we need to generate a bunch of small independent patches
for the same file (and we can't just generate a new tree with each patch
applied), this *should* be a faster alternative.

I don't have any performance numbers because I still need to test this
end-to-end with our internal codebase, but I'd be shocked if it was
slower than what we're doing.

This could theoretically live outside of LibCST, but it depends on a
whole bunch of LibCST internals, so there's some value in making sure
that this is in sync with the rest of LibCST.
2019-10-28 17:23:26 -07:00
..
_static [doc] use png file and fix typo 2019-09-16 19:53:22 -07:00
_templates [doc] Why libcst? 2019-07-24 12:19:00 -07:00
best_practices.rst Add a best practices section with various recommended practices. 2019-10-23 16:50:47 -07:00
conf.py add binder link to notebook tutorial page 2019-10-01 13:41:29 -07:00
experimental.rst Add a reentrant (incremental) codegen API 2019-10-28 17:23:26 -07:00
index.rst Add a reentrant (incremental) codegen API 2019-10-28 17:23:26 -07:00
matchers.rst Implement base version of matchers + metadata 2019-10-21 13:25:20 -07:00
matchers_tutorial.ipynb Add a tutorial for matchers. 2019-10-01 15:28:58 -07:00
metadata.rst Export CodePosition and CodeRange from metadata 2019-10-18 14:30:33 -07:00
metadata_tutorial.ipynb Update tutorial to use renamed PositionProvider 2019-10-18 16:04:00 -07:00
motivation.rst Add a motivation section for LibCST documentation. 2019-08-01 14:51:00 -07:00
nodes.rst Add documentation to matchers. 2019-10-01 15:28:58 -07:00
parser.rst Include ParserSyntaxError in parser documentation 2019-08-22 13:35:11 -07:00
scope_tutorial.ipynb address review feedback form #94 2019-10-08 15:48:59 -07:00
tutorial.ipynb update import paths in Jupyter notebook 2019-09-16 19:53:22 -07:00
visitors.rst Fix visitor helper function name pattern in docs 2019-10-04 21:40:52 -07:00
why_libcst.rst Lots of work on Why LibCST section 2019-08-06 16:55:08 -07:00