private void CodeBinary(BinaryExpression binary, List<LocalVariable> locals, List<GlobalVariable> globals, FuncParam[] parameters, ILGenerator il, List<Function> allFuncs, LocalBuilder tmpVar) { CodeExpression(binary.LeftOperand, locals, globals, parameters, il, allFuncs, tmpVar); CodeExpression(binary.RightOperand, locals, globals, parameters, il, allFuncs, tmpVar); var op = binary.Operator; if (!CodeLogicOp(op, il)) if (!CodeGreatOp(op, il)) if (!CodeLessOp(op, il)) CodeMathOp(op, il); }
private Expression Expr() { var ex = SimExpr(); while (StartOf(2)) { var op = BinaryOp(); var ex2 = Expr(); ex = new BinaryExpression(ex, op ,ex2); } return ex; }