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