Package org.eclipse.jdt.internal.compiler.parser

Examples of org.eclipse.jdt.internal.compiler.parser.Parser


    return nodes.get(0);
  }
 
  protected Node parseWithTargetCompiler(Source source) {
    CompilerOptions compilerOptions = ecjCompilerOptions();
    Parser parser = new Parser(new ProblemReporter(
        DefaultErrorHandlingPolicies.proceedWithAllProblems(),
        compilerOptions,
        new DefaultProblemFactory()
      ), compilerOptions.parseLiteralExpressionsAsConstants);
    parser.javadocParser.checkDocComment = true;
    CompilationUnit sourceUnit = new CompilationUnit(source.getRawInput().toCharArray(), source.getName(), "UTF-8");
    CompilationResult compilationResult = new CompilationResult(sourceUnit, 0, 0, 0);
    CompilationUnitDeclaration cud = parser.parse(sourceUnit, compilationResult);
   
    if (cud.hasErrors()) return null;
   
    EcjTreeConverter converter = new EcjTreeConverter();
    converter.visit(source.getRawInput(), cud);
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.parser.Parser

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.