コード例 #1
0
        internal MSA.Expression /*!*/ TryCatchAny(MSA.Expression /*!*/ tryBody, MSA.Expression /*!*/ catchBody)
        {
            var variable = CurrentScope.DefineHiddenVariable("#value", tryBody.Type);

            return
                (Ast.Block(
                     Ast.TryCatch(
                         Ast.Assign(variable, tryBody),
                         Ast.Catch(typeof(Exception),
                                   Ast.Assign(variable, catchBody)
                                   )
                         ),
                     variable
                     ));
        }