Boo.Lang.Compiler.Steps.ProcessMethodBodies.AddOptionalReturnStatement C# (CSharp) Метод

AddOptionalReturnStatement() приватный статический Метод

private static AddOptionalReturnStatement ( Block body ) : void
body Boo.Lang.Compiler.Ast.Block
Результат void
        private static void AddOptionalReturnStatement(Block body)
        {
            if (body.Statements.Count != 1) return;
            var stmt = body.FirstStatement as ExpressionStatement;
            if (null == stmt) return;

            var rs = new ReturnStatement(stmt.LexicalInfo, stmt.Expression, null);
            rs.Annotate(OptionalReturnStatementAnnotation);
            body.Replace(stmt, rs);
        }
ProcessMethodBodies