public FunctionBody(FunctionExpression parent, CallDepthProtection protection, bool hasCatch) { parent.Require(GlobalVariable.CSUM); if (hasCatch) { CatchStatement = new CodeStatement($"return {CaughtErrorIdentifier};"); } TryBody = new Block(parent); if (protection != null) { TryBody.Statements.Add(protection.Check); TryBody.Statements.Add(new ReturnStatement(parent.DefaultReturnValue)); FinallyStatements.Add(_incrementCallSumDepth); //FinallyStatements.Add(protection.Cleanup); } else { FinallyStatements.Add(_incrementCallSum); } }