private static ExpressionStatementTranslationUnit CreateReturnStatement(ReturnStatement helper, SemanticModel semanticModel) { if (helper.Expression == null) { // Void return return(ExpressionStatementTranslationUnit.CreateReturn()); } var expression = new ExpressionTranslationUnitBuilder(helper.Expression, semanticModel).Build(); return(ExpressionStatementTranslationUnit.CreateReturn(expression as ExpressionTranslationUnit)); }
/// <summary> /// /// </summary> /// <returns></returns> public static ITranslationUnit BuildReturnStatementTranslationUnit() { return(ExpressionStatementTranslationUnit.CreateReturn()); }
/// <summary> /// /// </summary> /// <returns></returns> public static ITranslationUnit BuildReturnStatementTranslationUnit(ITranslationUnit expression) { return(ExpressionStatementTranslationUnit.CreateReturn(expression as ExpressionTranslationUnit)); }