SyntaxRemoveOptions Enum

What to do with the trivia around a node that is being removed.

[Flags]
public enum SyntaxRemoveOptions

Remarks

A node's leading and trailing trivia would normally disappear with it, which quietly throws away any comment sitting in front of it. These say what to keep instead. Whatever is kept moves onto whatever now stands where the node was: the thing that follows it, or the thing before it when nothing follows.

Fields

NameValueDescription
KeepNoTrivia0Take the node and everything around it.
KeepLeadingTrivia1Keep what came in front of the node, such as the comment describing it.
KeepTrailingTrivia2Keep what came after the node.
KeepExteriorTrivia3Keep what came in front of and after the node.
KeepEndOfLine4Keep one line break out of what was removed, so the lines either side of it do not run together. Has no effect when a line break was already kept by one of the other options.