RoslynDOM icon indicating copy to clipboard operation
RoslynDOM copied to clipboard

Support for maintaining multiple variables and fields on a line

Open KathleenDollard opened this issue 10 years ago • 0 comments

This is legal in C#

public class A { private string A, B, C;

public void Foo() { int X, Y, Z; } }

which is semantically the same as putting them on separate lines.

RoslynDom loads these as though they were on separate lines. This is important in analysis that needs all the variables in the class and treats variables created with either approach identically. Currently, the syntax tree RoslynDom recreates places these on separate lines.

However, RoslynDom could roundtrip the code by recreating the syntax for the combined declaration using some grouping ID.

I anticipate doing this sometime when I am bored, if this is important to you, let me know.

KathleenDollard avatar Jul 25 '14 14:07 KathleenDollard