ICSharpCode.NRefactory.CSharp.CSharpOutputVisitor.OptionalComma C# (CSharp) Method

OptionalComma() protected method

Writes an optional comma, e.g. at the end of an enum declaration or in an array initializer
protected OptionalComma ( AstNode pos ) : void
pos AstNode
return void
		protected virtual void OptionalComma(AstNode pos)
		{
			// Look if there's a comma after the current node, and insert it if it exists.
			while (pos != null && pos.NodeType == NodeType.Whitespace) {
				pos = pos.NextSibling;
			}
			if (pos != null && pos.Role == Roles.Comma) {
				Comma(null, noSpaceAfterComma: true);
			}
		}
		
CSharpOutputVisitor