org.eclipse.jdt.internal.compiler.parser.Parser.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(8.6k)|赞(0)|评价(0)|浏览(254)

本文整理了Java中org.eclipse.jdt.internal.compiler.parser.Parser.<init>()方法的一些代码示例,展示了Parser.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Parser.<init>()方法的具体详情如下:
包路径:org.eclipse.jdt.internal.compiler.parser.Parser
类名称:Parser
方法名:<init>

Parser.<init>介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

  1. private Expression parseMemberValue(char[] memberValue) {
  2. // memberValue must not be null
  3. if (this.parser == null) {
  4. this.parser = new Parser(this.problemReporter, true);
  5. }
  6. return this.parser.parseMemberValue(memberValue, 0, memberValue.length, this.unit);
  7. }
  8. }

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

  1. private Expression parseMemberValue(char[] memberValue) {
  2. // memberValue must not be null
  3. if (this.parser == null) {
  4. this.parser = new Parser(this.problemReporter, true);
  5. }
  6. return this.parser.parseMemberValue(memberValue, 0, memberValue.length, this.unit);
  7. }
  8. }

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

  1. private Expression parseMemberValue(char[] memberValue) {
  2. // memberValue must not be null
  3. if (this.parser == null) {
  4. this.parser = new Parser(this.problemReporter, true);
  5. }
  6. return this.parser.parseMemberValue(memberValue, 0, memberValue.length, this.unit);
  7. }
  8. }

代码示例来源:origin: com.vaadin/vaadin-client-compiler-deps

  1. private Expression parseMemberValue(char[] memberValue) {
  2. // memberValue must not be null
  3. if (this.parser == null) {
  4. this.parser = new Parser(this.problemReporter, true);
  5. }
  6. return this.parser.parseMemberValue(memberValue, 0, memberValue.length, this.unit);
  7. }
  8. }

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

  1. private Expression parseMemberValue(char[] memberValue) {
  2. // memberValue must not be null
  3. if (this.parser == null) {
  4. this.parser = new Parser(this.problemReporter, true);
  5. }
  6. return this.parser.parseMemberValue(memberValue, 0, memberValue.length, this.unit);
  7. }
  8. }

代码示例来源:origin: org.projectlombok/lombok.ast

  1. private static Parser makeDummyParser(ProblemReporter reporter, String mainTypeName) {
  2. Parser parser = new Parser(reporter, false);
  3. CompilationResult cr = new CompilationResult((mainTypeName + ".java").toCharArray(), 0, 1, 0);
  4. parser.compilationUnit = new CompilationUnitDeclaration(reporter, cr, 0);
  5. return parser;
  6. }

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

  1. private CompilationUnitDeclaration convert(IModule module, CompilationResult compilationResult) throws JavaModelException {
  2. this.unit = new CompilationUnitDeclaration(this.problemReporter, compilationResult, 0);
  3. // not filled at this point
  4. ModuleDescriptionInfo moduleInfo = (ModuleDescriptionInfo) module;
  5. org.eclipse.jdt.core.ICompilationUnit cuHandle = moduleInfo.getHandle().getCompilationUnit();
  6. this.cu = (ICompilationUnit) cuHandle;
  7. // always parse, because (a) dietParse is always sufficient, (b) we don't yet have the necessary conversion methods for module directives
  8. return new Parser(this.problemReporter, true).dietParse(this.cu, compilationResult);
  9. }

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

  1. private Parser basicParser() {
  2. if (this.basicParser == null) {
  3. ProblemReporter problemReporter =
  4. new ProblemReporter(
  5. DefaultErrorHandlingPolicies.proceedWithAllProblems(),
  6. this.options,
  7. new DefaultProblemFactory());
  8. this.basicParser = new Parser(problemReporter, false);
  9. this.basicParser.reportOnlyOneSyntaxError = true;
  10. }
  11. return this.basicParser;
  12. }

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

  1. protected Parser basicParser() {
  2. if (this.basicParser == null) {
  3. ProblemReporter problemReporter =
  4. new ProblemReporter(
  5. DefaultErrorHandlingPolicies.proceedWithAllProblems(),
  6. this.options,
  7. new DefaultProblemFactory());
  8. this.basicParser = new Parser(problemReporter, false);
  9. this.basicParser.reportOnlyOneSyntaxError = true;
  10. }
  11. return this.basicParser;
  12. }
  13. /*

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

  1. protected Parser basicParser() {
  2. if (this.basicParser == null) {
  3. ProblemReporter problemReporter =
  4. new ProblemReporter(
  5. DefaultErrorHandlingPolicies.proceedWithAllProblems(),
  6. this.options,
  7. new DefaultProblemFactory());
  8. this.basicParser = new Parser(problemReporter, false);
  9. this.basicParser.reportOnlyOneSyntaxError = true;
  10. }
  11. return this.basicParser;
  12. }
  13. /*

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

  1. private Parser getParser() {
  2. Map<String,String> opts = new HashMap<String, String>();
  3. opts.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_9);
  4. return new Parser(
  5. new ProblemReporter(DefaultErrorHandlingPolicies.exitOnFirstError(), new CompilerOptions(opts), new DefaultProblemFactory(Locale.getDefault())),
  6. false);
  7. }
  8. @Override

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

  1. private Parser getParser() {
  2. Map<String,String> opts = new HashMap<String, String>();
  3. opts.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_9);
  4. return new Parser(
  5. new ProblemReporter(DefaultErrorHandlingPolicies.exitOnFirstError(), new CompilerOptions(opts), new DefaultProblemFactory(Locale.getDefault())),
  6. false);
  7. }
  8. @Override

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

  1. private ReferenceExpression copy() {
  2. final Parser parser = new Parser(this.enclosingScope.problemReporter(), false);
  3. final ICompilationUnit compilationUnit = this.compilationResult.getCompilationUnit();
  4. final char[] source = compilationUnit != null ? compilationUnit.getContents() : this.text;
  5. ReferenceExpression copy = (ReferenceExpression) parser.parseExpression(source, compilationUnit != null ? this.sourceStart : 0, this.sourceEnd - this.sourceStart + 1,
  6. this.enclosingScope.referenceCompilationUnit(), false /* record line separators */);
  7. copy.original = this;
  8. copy.sourceStart = this.sourceStart;
  9. copy.sourceEnd = this.sourceEnd;
  10. return copy;
  11. }

代码示例来源:origin: org.eclipse.jdt.core.compiler/ecj

  1. private ReferenceExpression copy() {
  2. final Parser parser = new Parser(this.enclosingScope.problemReporter(), false);
  3. final ICompilationUnit compilationUnit = this.compilationResult.getCompilationUnit();
  4. final char[] source = compilationUnit != null ? compilationUnit.getContents() : this.text;
  5. ReferenceExpression copy = (ReferenceExpression) parser.parseExpression(source, compilationUnit != null ? this.sourceStart : 0, this.sourceEnd - this.sourceStart + 1,
  6. this.enclosingScope.referenceCompilationUnit(), false /* record line separators */);
  7. copy.original = this;
  8. copy.sourceStart = this.sourceStart;
  9. copy.sourceEnd = this.sourceEnd;
  10. return copy;
  11. }

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

  1. private ReferenceExpression copy() {
  2. final Parser parser = new Parser(this.enclosingScope.problemReporter(), false);
  3. final ICompilationUnit compilationUnit = this.compilationResult.getCompilationUnit();
  4. final char[] source = compilationUnit != null ? compilationUnit.getContents() : this.text;
  5. parser.scanner = this.scanner;
  6. ReferenceExpression copy = (ReferenceExpression) parser.parseExpression(source, compilationUnit != null ? this.sourceStart : 0, this.sourceEnd - this.sourceStart + 1,
  7. this.enclosingScope.referenceCompilationUnit(), false /* record line separators */);
  8. copy.original = this;
  9. copy.sourceStart = this.sourceStart;
  10. copy.sourceEnd = this.sourceEnd;
  11. return copy;
  12. }

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

  1. private ReferenceExpression copy() {
  2. final Parser parser = new Parser(this.enclosingScope.problemReporter(), false);
  3. final ICompilationUnit compilationUnit = this.compilationResult.getCompilationUnit();
  4. final char[] source = compilationUnit != null ? compilationUnit.getContents() : this.text;
  5. parser.scanner = this.scanner;
  6. ReferenceExpression copy = (ReferenceExpression) parser.parseExpression(source, compilationUnit != null ? this.sourceStart : 0, this.sourceEnd - this.sourceStart + 1,
  7. this.enclosingScope.referenceCompilationUnit(), false /* record line separators */);
  8. copy.original = this;
  9. copy.sourceStart = this.sourceStart;
  10. copy.sourceEnd = this.sourceEnd;
  11. return copy;
  12. }

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

  1. private Parser getParser() {
  2. if (this.parser == null) {
  3. this.compilerOptions = new CompilerOptions(JavaCore.getOptions());
  4. ProblemReporter problemReporter =
  5. new ProblemReporter(
  6. DefaultErrorHandlingPolicies.proceedWithAllProblems(),
  7. this.compilerOptions,
  8. new DefaultProblemFactory());
  9. this.parser = new Parser(problemReporter, true);
  10. }
  11. return this.parser;
  12. }

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

  1. private Parser getParser() {
  2. if (this.parser == null) {
  3. this.compilerOptions = new CompilerOptions(JavaCore.getOptions());
  4. ProblemReporter problemReporter =
  5. new ProblemReporter(
  6. DefaultErrorHandlingPolicies.proceedWithAllProblems(),
  7. this.compilerOptions,
  8. new DefaultProblemFactory());
  9. this.parser = new Parser(problemReporter, true);
  10. }
  11. return this.parser;
  12. }

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

  1. private Parser getNewParser() {
  2. return new Parser(new ProblemReporter(getHandlingPolicy(),
  3. new CompilerOptions(this.options), getProblemFactory()), false);
  4. }
  5. private IModule extractModuleDesc(String fileName) {

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

  1. private Parser getNewParser() {
  2. return new Parser(new ProblemReporter(getHandlingPolicy(),
  3. new CompilerOptions(this.options), getProblemFactory()), false);
  4. }
  5. private IModule extractModuleDesc(String fileName) {

相关文章

Parser类方法