2 releases
0.1.1 | Nov 2, 2024 |
---|---|
0.1.0 | Jul 27, 2024 |
#1 in #rewriting
3,877 downloads per month
Used in 6 crates
(3 directly)
25KB
569 lines
rewriter
Rust utilities for rewriting files
Main exports
-
Rewriter
: rewrites a file's contents -
Backup
: restores a file's contents when dropped, unless explicitly disabled -
Span
: names a region of a file, similar toproc-macro2::Span
-
LineColumn
: names a point in a file, similar toproc-macro2::LineColumn
-
interface::Span
andinterface::LineColumn
: traits that span and line-column types must implement to be used with this library
Features
-
proc-macro2-span
: By defaultrewriter
, uses its ownSpan
andLineColumn
types. When this feature is enabled,rewriter
instead uses the corresponding types fromproc-macro2
. This feature impliesproc-macro2-impl
below. -
proc-macro2-impl
: Implement theSpan
andLineColumn
traits for the corresponding types inproc-macro2
.
Dependencies
~1.6–10MB
~114K SLoC