public override ExpressionCode GenerateCode() { if (LeftValue.GenerateCode().Type == "string") { return new ExpressionCode { Code = LeftValue.GenerateCode().Code + " += " + RightValue.GenerateCode().Code, Type = "string" } } ; if (LeftValue.GenerateCode().Type == "char") { return new ExpressionCode { Code = LeftValue.GenerateCode().Code + " += " + RightValue.GenerateCode().Code, Type = "char" } } ; if (LeftValue.GenerateCode().Type == "int") { return new ExpressionCode { Code = LeftValue.GenerateCode().Code + " += " + RightValue.GenerateCode().Code, Type = "int" } } ; return(new ExpressionCode { Code = LeftValue.GenerateCode().Code + " += " + RightValue.GenerateCode().Code, Type = "float" }); } } }
public override ExpressionCode GenerateCode() { if (LeftValue.GenerateCode().Type == "bool") { return new ExpressionCode { Code = LeftValue.GenerateCode().Code + " |= " + RightValue.GenerateCode().Code, Type = "bool" } } ; return(new ExpressionCode { Code = LeftValue.GenerateCode().Code + " |= " + RightValue.GenerateCode().Code, Type = "int" }); } }
public override ExpressionCode GenerateCode() { return(new ExpressionCode { Code = LeftValue.GenerateCode().Code, Type = LeftValue.GenerateCode().Type }); }
public override ExpressionCode GenerateCode() { return(new ExpressionCode { Code = LeftValue.GenerateCode().Code + " >>= " + RightValue.GenerateCode().Code, Type = "int" }); }
public override ExpressionCode GenerateCode() { return new ExpressionCode { Code = LeftValue.GenerateCode().Code + " = " + RightValue.GenerateCode().Code }; }