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

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


            CompilerOptions options = createCompilerOptions();
            ProblemReporter problemReporter = new ProblemReporter(
                    DefaultErrorHandlingPolicies.exitOnFirstError(),
                    options,
                    new DefaultProblemFactory());
            mParser = new Parser(problemReporter,
                    options.parseLiteralExpressionsAsConstants);
            mParser.javadocParser.checkDocComment = false;
        }
        return mParser;
    }
View Full Code Here


        options.parseLiteralExpressionsAsConstants = true;
        ProblemReporter problemReporter = new ProblemReporter(
                DefaultErrorHandlingPolicies.exitOnFirstError(),
                options,
                new DefaultProblemFactory());
        mParser = new Parser(problemReporter, options.parseLiteralExpressionsAsConstants);
        mParser.javadocParser.checkDocComment = false;
    }
View Full Code Here

            CompilerOptions options = createCompilerOptions();
            ProblemReporter problemReporter = new ProblemReporter(
                    DefaultErrorHandlingPolicies.exitOnFirstError(),
                    options,
                    new DefaultProblemFactory());
            mParser = new Parser(problemReporter,
                    options.parseLiteralExpressionsAsConstants);
            mParser.javadocParser.checkDocComment = false;
        }
        return mParser;
    }
View Full Code Here

    JustJavadocParser(ProblemReporter reporter, String mainTypeName) {
      super(makeDummyParser(reporter, mainTypeName));
    }
   
    private static Parser makeDummyParser(ProblemReporter reporter, String mainTypeName) {
      Parser parser = new Parser(reporter, false);
      CompilationResult cr = new CompilationResult((mainTypeName + ".java").toCharArray(), 0, 1, 0);
      parser.compilationUnit = new CompilationUnitDeclaration(reporter, cr, 0);
      return parser;
    }
View Full Code Here

            CompilerOptions options = createCompilerOptions();
            ProblemReporter problemReporter = new ProblemReporter(
                    DefaultErrorHandlingPolicies.exitOnFirstError(),
                    options,
                    new DefaultProblemFactory());
            mParser = new Parser(problemReporter,
                    options.parseLiteralExpressionsAsConstants);
            mParser.javadocParser.checkDocComment = false;
        }
        return mParser;
    }
View Full Code Here

            CompilerOptions options = createCompilerOptions();
            ProblemReporter problemReporter = new ProblemReporter(
                    DefaultErrorHandlingPolicies.exitOnFirstError(),
                    options,
                    new DefaultProblemFactory());
            mParser = new Parser(problemReporter,
                    options.parseLiteralExpressionsAsConstants);
            mParser.javadocParser.checkDocComment = false;
        }
        return mParser;
    }
View Full Code Here

  }
 
  private void parseWithEcj(Source source) {
    if (VERBOSE) {
      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);
      parser.parse(sourceUnit, compilationResult);
    }
  }
View Full Code Here

  }
 
  @Override
  protected ASTNode 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;
    return cud;
  }
View Full Code Here

  }
 
  @Override
  protected ASTNode parseWithLombok(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

  }
 
  @Override
  protected ASTNode 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;
   
    return 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.