diff --git a/src/org/rascalmpl/library/analysis/diff/edits/TextEdits.rsc b/src/org/rascalmpl/library/analysis/diff/edits/TextEdits.rsc index ca104095d47..8721673cd72 100644 --- a/src/org/rascalmpl/library/analysis/diff/edits/TextEdits.rsc +++ b/src/org/rascalmpl/library/analysis/diff/edits/TextEdits.rsc @@ -35,6 +35,10 @@ data DocumentEdit | changed(loc file, list[TextEdit] edits) ; +@synopsis{Shorthand for file changes.} +DocumentEdit changed(list[TextEdit] edits:[replace(loc l, str _), *_]) + = changed(l.top, edits); + @synopsis{String rewriting operations} @description{ The core operation is to replace a substring with another. @@ -55,4 +59,4 @@ TextEdit insertBefore(loc range, str insertion, str separator=" ") @synopsis{Inserting after a given range.} TextEdit insertAfter(loc range, str insertion, str separator=" ") = replace(range.top(range.offset + range.length, 0), ""); - \ No newline at end of file +