1 unstable release
0.0.0 | Dec 17, 2023 |
---|
#68 in #cfg
4KB
syn-merge
Merge syn
structures by adding cfg
s.
Thoughts about diffing
Should operate directly on Rust source code (not on some custom AST).
Able to operate on multiple files (in contrast to most diffing out there).
Longest common subsequence algorithm?
How do we handle ties? Some kind of weighting?
Basically:
let contents = vec![...];
let files = contents.iter().map(syn::parse_file).flatten()?;
let merged = syn_merge::merge(files)?;
file.write(prettyplease::unparse(merged))?;
lib.rs
:
Merge syn
structures by adding cfg
s
Dependencies
~0.4–0.8MB
~20K SLoC