예제 #1
0
 public void Free(SyntaxListBuilder item)
 {
     if (item != null)
     {
         item.Clear();
         _freeList.Push(item);
     }
 }
        // Create a SkippedTokens trivia from any tokens currently accumulated into the skippedTokensBuilder. If not,
        // don't do anything.
        private void FinishInProgressTokens()
        {
            if (skippedTokensBuilder.Count > 0)
            {
                var skippedTokensTrivia = SyntaxFactory.SkippedTokensTrivia(skippedTokensBuilder.ToList());
                if (diagnosticsToAdd != null)
                {
                    foreach (var d in diagnosticsToAdd)
                    {
                        ////skippedTokensTrivia = skippedTokensTrivia.AddError(d);
                    }

                    diagnosticsToAdd = null; // only add once.
                }

                triviaListBuilder.Add(skippedTokensTrivia);
                skippedTokensBuilder.Clear();
            }
        }
예제 #3
0
 public void Clear()
 {
     _builder.Clear();
 }