Package sharpen.core.csharp.ast

Examples of sharpen.core.csharp.ast.CSCompilationUnit


  }

  protected CSCompilationUnit run(final CompilationUnit ast) {
    processProblems(ast);
    prepareForConversion(ast);   
    CSCompilationUnit cs = convert(ast);
    if (!cs.ignore() && !cs.types().isEmpty()) {
      print(cs);
    }
    return cs;
  }
View Full Code Here


  protected void processProblems(CompilationUnit ast) {
    ASTUtility.checkForProblems(ast, !ignoringErrors());
  }

  private CSCompilationUnit convert(final CompilationUnit ast) {
    final CSCompilationUnit compilationUnit = new CSCompilationUnit();
    final Environment environment = Environments.newConventionBasedEnvironment(ast, _configuration, _resolver, compilationUnit);
    Environments.runWith(environment, new Runnable() { public void run() {
      CSharpBuilder builder = new CSharpBuilder();
      builder.run();
    }});
View Full Code Here

    SharpenConversion converter = new SharpenConversion(_configuration);
    final StringWriter writer = new StringWriter();
    converter.setTargetWriter(writer);
    converter.setSource(source);
    converter.setASTResolver(resolver);
    CSCompilationUnit result = converter.run(ast);
    if (writer.getBuffer().length() > 0) {
      saveConvertedFile(source, result, writer);
    }
  }
View Full Code Here

TOP

Related Classes of sharpen.core.csharp.ast.CSCompilationUnit

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.