示例#1
0
            public void MergeThrowLocations(BoundBlockWithExceptions block)
            {
                foreach (var item in block.ThrowLocations)
                {
                    var throwType = item.Key;
                    PooledHashSet <SyntaxNode> nodes;
                    if (!ThrowLocations.TryGetValue(throwType, out nodes))
                    {
                        nodes = PooledHashSet <SyntaxNode> .GetInstance();

                        ThrowLocations.Add(throwType, nodes);
                    }

                    foreach (var syntax in item.Value)
                    {
                        nodes.Add(syntax);
                    }
                }
            }
示例#2
0
        private void PushTryBlock(BoundStatement bound)
        {
            var block = new BoundBlockWithExceptions(bound);

            _blockWithExceptions.Add(block);
        }