protected LNode OnNewLine(LNode node) { return node.PlusAttrBefore(F.TriviaNewline); }
public LNode Attr(LNode attr, LNode node) { return node.PlusAttrBefore(attr); }
/// <summary>Adds a leading newline to the node if the first attribute isn't a newline.</summary> /// <remarks>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 <see cref="CodeSymbols.TriviaNewline"/>. For all other nodes, /// this method just ensures there is a line break.</remarks> public LNode OnNewLine(LNode node) { if (node.Attrs[0, Missing_].IsIdNamed(S.TriviaNewline)) return node; return node.PlusAttrBefore(TriviaNewline); }
protected LNode OnNewLine(LNode node) { return(node.PlusAttrBefore(F.TriviaNewline)); }