KDAB / knut

Knut is an automation tool for code transformation using scripts.
Other
5 stars 8 forks source link

Add a removeLines method in CppDocument #24

Open narnaud opened 2 weeks ago

narnaud commented 2 weeks ago

We sometimes want to remove a line (most likely based on a QueryMatch).

Would be nice to have a removeLines(RangeMark) method, that removes the query as well as all comments attached to it (either // or / /). Also remove the comment on the same line.

Something like that:

// This should stay

RemoveThisLine(); // <- only this line

// This should be removed
RemoveThisOtherLine(); // <- this line + the comment above

RemoveAnotherLine(); // Also remove this comment