Loyc.Syntax.LNodeFactory.OnNewLine C# (CSharp) Method

OnNewLine() public method

Adds a leading newline to the node if the first attribute isn't a newline.
By convention, in Loyc languages, top-level nodes and nodes within braces have an implicit newline, such that a leading blank line appears if you add CodeSymbols.TriviaNewline. For all other nodes, this method just ensures there is a line break.
public OnNewLine ( LNode node ) : LNode
node LNode
return LNode
		public LNode OnNewLine(LNode node)
		{
			if (node.Attrs[0, Missing_].IsIdNamed(S.TriviaNewline))
				return node;
			return node.PlusAttrBefore(TriviaNewline);
		}