Crates.io | syn-merge |
lib.rs | syn-merge |
version | 0.0.0 |
source | src |
created_at | 2023-12-17 16:39:44.405429 |
updated_at | 2023-12-17 16:39:44.405429 |
description | Merge syn structures by adding cfgs |
homepage | |
repository | https://github.com/madsmtm/syn-merge |
max_upload_size | |
id | 1072610 |
size | 5,150 |
syn-merge
Merge syn
structures by adding cfg
s.
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))?;