Exemple #1
0
  @Override
  public EvalResult produceOutput(PrintStream out) throws Exception {
    SwitchNode switchNode = scope.getSwitchNode();
    if (switchNode == null) {
      throw new Exception("Default outside switch");
    }
    String label = IdCounter.GetNewLabel();
    out.printf("br label %%%s\n", label);
    out.printf("%s:\n", label);

    switchNode.setDefaultLabel(label);
    return null;
  }