public override void GenCode() { condition.GenCode(); EmitCode("brfalse {0}", label); statement.GenCode(); Compiler.AddLabel(label); }
public override void GenCode() { Compiler.AddLabel(startLabel); condition.GenCode(); EmitCode("brfalse {0}", endLabel); statement.GenCode(); EmitCode("br {0}", startLabel); Compiler.AddLabel(endLabel); }
public override void GenCode() { exp1.GenCode(); EmitCode("dup"); EmitCode("brfalse {0}", label); exp2.GenCode(); EmitCode(operation); Compiler.AddLabel(label); }
public override void GenCode() { condition.GenCode(); EmitCode("brfalse {0}", elseLabel); ifStatement.GenCode(); EmitCode("br {0}", ifLabel); Compiler.AddLabel(elseLabel); elseStatement.GenCode(); Compiler.AddLabel(ifLabel); }