public virtual CalcExpression Visit(CalcExpression expr, int baseRow, int baseColumn) { CalcConstantExpression expression = expr as CalcConstantExpression; if (expression != null) { return(this.VisitConstantExpression(expression)); } CalcCellExpression expression2 = expr as CalcCellExpression; if (expression2 != null) { return(this.VisitCellExpression(expression2, baseRow, baseColumn)); } CalcRangeExpression expression3 = expr as CalcRangeExpression; if (expression3 != null) { return(this.VisitRangeExpression(expression3, baseRow, baseColumn)); } CalcUnaryOperatorExpression expression4 = expr as CalcUnaryOperatorExpression; if (expression4 != null) { return(this.VisitUnaryOperatorExpression(expression4, baseRow, baseColumn)); } CalcBinaryOperatorExpression expression5 = expr as CalcBinaryOperatorExpression; if (expression5 != null) { return(this.VisitBinaryOperatorExpression(expression5, baseRow, baseColumn)); } CalcFunctionExpression expression6 = expr as CalcFunctionExpression; if (expression6 != null) { return(this.VisitFunctionExpression(expression6, baseRow, baseColumn)); } CalcExternalCellExpression expression7 = expr as CalcExternalCellExpression; if (expression7 != null) { return(this.VisitExternalCellExpression(expression7, baseRow, baseColumn)); } CalcExternalRangeExpression expression8 = expr as CalcExternalRangeExpression; if (expression8 != null) { return(this.VisitExternalRangeExpression(expression8, baseRow, baseColumn)); } if (expr is CalcSharedExpression) { CalcExpression expression9 = (expr as CalcSharedExpression).Expression; CalcExpression expression10 = this.Visit(expression9, baseRow, baseColumn); if (expression10 == expression9) { return(expr); } return(new CalcSharedExpression(expression10)); } CalcParenthesesExpression expression11 = expr as CalcParenthesesExpression; if (expression11 != null) { return(this.VisitParenthesesExpression(expression11, baseRow, baseColumn)); } CalcNameExpression expression12 = expr as CalcNameExpression; if (expression12 != null) { return(this.VisitNameExpression(expression12, baseRow, baseColumn)); } CalcExternalNameExpression expression13 = expr as CalcExternalNameExpression; if (expression13 != null) { return(this.VisitExternalNameExpression(expression13, baseRow, baseColumn)); } CalcSheetRangeExpression expression14 = expr as CalcSheetRangeExpression; if (expression14 != null) { return(this.VisitSheetRangeExpression(expression14, baseRow, baseColumn)); } return(expr); }
protected virtual CalcExpression VisitCellExpression(CalcCellExpression expr, int baseRow, int baseColumn) { return(expr); }