Code cleanup.

This commit is contained in:
2023-04-22 21:08:06 +08:00
parent 2784544884
commit d72afaa75b
5 changed files with 14 additions and 17 deletions

View File

@@ -36,16 +36,6 @@ namespace Cryville.Common.Pdt {
return Operate(target, _framecount, true);
}
/// <summary>
/// Patches an expression with a lefthand variable and a compound operator.
/// </summary>
/// <param name="target">The name of the lefthand variable.</param>
/// <param name="op">The name of the compound operator.</param>
/// <param name="exp">The expression.</param>
public void PatchCompound(int target, int op, PdtExpression exp) {
exp.Instructions.AddFirst(new PdtInstruction.PushVariable(target));
exp.Instructions.AddLast(new PdtInstruction.Operate(op, 2));
}
/// <summary>
/// Optimizes an expression by merging its instructions.
/// </summary>
/// <param name="exp">The expression to optimize.</param>