Code cleanup.
This commit is contained in:
@@ -27,6 +27,16 @@ namespace Cryville.Common.Pdt {
|
||||
}
|
||||
return r;
|
||||
}
|
||||
/// <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 static void PatchCompound(int target, int op, PdtExpression exp) {
|
||||
exp.Instructions.AddFirst(new PdtInstruction.PushVariable(target));
|
||||
exp.Instructions.AddLast(new PdtInstruction.Operate(op, 2));
|
||||
}
|
||||
}
|
||||
internal abstract class PdtInstruction {
|
||||
internal abstract void Execute(PdtEvaluatorBase etor);
|
||||
|
Reference in New Issue
Block a user