syn-merge

Crates.iosyn-merge
lib.rssyn-merge
version0.0.0
sourcesrc
created_at2023-12-17 16:39:44.405429
updated_at2023-12-17 16:39:44.405429
descriptionMerge syn structures by adding cfgs
homepage
repositoryhttps://github.com/madsmtm/syn-merge
max_upload_size
id1072610
size5,150
Mads Marquart (madsmtm)

documentation

https://docs.rs/syn-merge

README

syn-merge

Latest version Documentation CI

Merge syn structures by adding cfgs.

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))?;
Commit count: 18

cargo fmt