Package xtc.lang

Examples of xtc.lang.JavaPrinter


            runtime.error(file.toString() + ": " + x.getMessage());
          }
          return;
        }     
        printHeader(out);
        new JavaPrinter(out).dispatch(result_ast);
        out.flush();
      }

      // Write the xxxTypes.java
      file = new File(dir, output + "Types.java" );
      try {     
        out = new
          Printer(new PrintWriter(new BufferedWriter(new FileWriter(file))));
      } catch (IOException x) {
        if (null == x.getMessage()) {
          runtime.error(file.toString() + ": I/O error");
        } else {
          runtime.error(file.toString() + ": " + x.getMessage());
        }
        return;
      }     
      printHeader(out);
      new JavaPrinter(out).dispatch(types_ast);
      out.flush();
     
      // Write the xxxSupport.java
      file = new File(dir, output + "Support.java" );
      try {     
        out = new
          Printer(new PrintWriter(new BufferedWriter(new FileWriter(file))));
      } catch (IOException x) {
        if (null == x.getMessage()) {
          runtime.error(file.toString() + ": I/O error");
        } else {
          runtime.error(file.toString() + ": " + x.getMessage());
        }
        return;
      }     
      printHeader(out);
      new JavaPrinter(out).dispatch(support_ast);
      out.flush();
    }

    if (runtime.test("printSource")) {
      new JavaPrinter(runtime.console()).dispatch(result_ast);
      runtime.console().flush();
    }      
  }
View Full Code Here

TOP

Related Classes of xtc.lang.JavaPrinter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.