private void FlushAccumulatedLitteralContent() { if (_literalGroupingAccumulator.Length != 0) { var groupedLitteralElements = new SyntaxElement(_literalGroupingAccumulator.ToString(), SyntaxElementKind.Litteral); _elements.Add(groupedLitteralElements); _literalGroupingAccumulator.Clear(); } }
private bool IsPurelyLitteral(SyntaxElement element) { return (element.Kind == SyntaxElementKind.Litteral || (element as TriviaSyntaxElement)?.TriviaKind == TriviaSyntaxElementKind.Whitespace); }