private ExpressionValue ParseTextConcatinationNode(TextConcatinationNode textConcatinationNode) { ExpressionValue leftExpressionValue = ParseExpressionNode(textConcatinationNode.Left); ExpressionValue rightExpressionValue = ParseExpressionNode(textConcatinationNode.Right); return(leftExpressionValue.Combine(rightExpressionValue, ExpressionOperator.Plus)); }
private ExpressionValue ParseArthimeticNode(ArthimetricExpressionNode arthimeticExpressionNode) { ExpressionValue leftExpressionValue = ParseExpressionNode(arthimeticExpressionNode.Left); ExpressionValue rightExpressionValue = ParseExpressionNode(arthimeticExpressionNode.Right); ExpressionOperator expressionOperator = ExpressionOperator.Undefined; switch (arthimeticExpressionNode.Operator) { case ArthimetricOperator.Div: expressionOperator = ExpressionOperator.Divide; break; case ArthimetricOperator.Minus: expressionOperator = ExpressionOperator.Minus; break; case ArthimetricOperator.Plus: expressionOperator = ExpressionOperator.Plus; break; case ArthimetricOperator.Mult: expressionOperator = ExpressionOperator.Multiply; break; default: throw new NotImplementedException(); } return(leftExpressionValue.Combine(rightExpressionValue, expressionOperator)); }
private ExpressionValue ParseLogicalNode(LogicalExpressionNode logicalExpressionNode) { ExpressionValue leftExpressionValue = ParseExpressionNode(logicalExpressionNode.Left); ExpressionValue rightExpressionValue = ParseExpressionNode(logicalExpressionNode.Right); ExpressionOperator expressionOperator = ExpressionOperator.Undefined; switch (logicalExpressionNode.Operator) { case LogicalOperator.And: expressionOperator = ExpressionOperator.And; break; case LogicalOperator.Or: expressionOperator = ExpressionOperator.Or; break; default: throw new NotImplementedException(); } return(leftExpressionValue.Combine(rightExpressionValue, expressionOperator)); }