예제 #1
0
        internal override CodeBlock WriteDebugCode(IMethodSymbolGenerator symbolGenerator)
        {
            var start = symbolGenerator.GetCurrentPosition();

            symbolGenerator.WriteNamedBlock("try", _tryExpression);

            foreach (var catchBlock in _catchBlocks)
            {
                catchBlock.WriteDebugCode(symbolGenerator);
            }

            if (_finallyExpression != null)
            {
                symbolGenerator.WriteNamedBlock("finally", _finallyExpression);
            }
            return(start.BlockTo(symbolGenerator.GetCurrentPosition()));
        }
예제 #2
0
 internal override CodeBlock WriteDebugCode(IMethodSymbolGenerator symbolGenerator)
 {
     return(symbolGenerator.GetCurrentPosition().BlockTo(symbolGenerator.WriteNamedBlock("while (true)", _loop).GetCurrentPosition()));
 }