Skip to content
Snippets Groups Projects
cs_codegen.patch 1.01 KiB
Newer Older
  • Learn to ignore specific revisions
  • Anders Nilsson's avatar
    Anders Nilsson committed
    *** CS_CodeGen.old	2010-06-03 13:46:00.000000000 +0200
    --- CS_CodeGen.jrag	2010-06-03 14:05:00.000000000 +0200
    ***************
    *** 419,424 ****
    --- 419,426 ----
          for (int i = 0 ; i < getNumExp() ; i++) {
            String limit = getExp(i).CS_emitEncoder(env, 
      					      name + ".GetLength(" + i + ")");
    +       env.println("{");
    +       env.indent();
            env.println("int i_" + (baseDepth + i) + "_max = " + limit + ";");
          }
          String index = null;
    ***************
    *** 434,439 ****
    --- 436,443 ----
          for (int i = 0 ; i < getNumExp() ; i++) {
            env.print_for_end();
          }
    +     env.unindent();
    +     env.println("}");
        }
        
        public String Exp.CS_emitEncoder(CS_env env, String name) {
    ***************
    *** 725,730 ****
    --- 729,735 ----
        public void PrimType.CS_emitType(CS_env env) {
          switch (getToken()) {
            case LABCOMM_STRING: { env.print("String"); } break;
    +       case LABCOMM_BOOLEAN: { env.print("bool"); } break;
            default: { env.print(getName()); } break;
          }
        }