Example #1
0
        internal SyntaxListBuilder Allocate()
        {
            SyntaxListBuilder item;

            if (_freeIndex > 0)
            {
                _freeIndex--;
                item = _freeList[_freeIndex].Value;
                _freeList[_freeIndex].Value = null;
            }
            else
            {
                item = new SyntaxListBuilder(10);
            }

#if DEBUG
            Debug.Assert(!_allocated.Contains(item));
            _allocated.Add(item);
#endif
            return(item);
        }
Example #2
0
 internal SeparatedSyntaxListBuilder(SyntaxListBuilder builder)
 {
     _builder = builder;
 }