MCPcopy Create free account
hub / github.com/concensure/Semantic / ast_to_diff

Method ast_to_diff

patch_engine/src/lib.rs:45–52  ·  view source on GitHub ↗
(file_path: &str, ast_edit: &ASTEdit)

Source from the content-addressed store, hash-verified

43 }
44
45 pub fn ast_to_diff(file_path: &str, ast_edit: &ASTEdit) -> String {
46 format!(
47 "--- {file}\n+++ {file}\n@@ AST_EDIT @@\n# symbol: {symbol}\n# transformation: {tx:?}\n",
48 file = file_path,
49 symbol = ast_edit.target_symbol,
50 tx = ast_edit.transformation
51 )
52 }
53
54 pub fn validate_patch(file_path: &str, patch: &CodePatch, existing_code: &str) -> Result<()> {
55 let updated = match &patch.representation {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected