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

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

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

Parser.flushCommentsDefinedPriorTo介绍

暂无

代码示例

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

protected void consumePackageDeclaration() {
  // PackageDeclaration ::= 'package' Name ';'
  /* build an ImportRef build from the last name
  stored in the identifier stack. */

  ImportReference impt = this.compilationUnit.currentPackage;
  this.compilationUnit.javadoc = this.javadoc;
  this.javadoc = null;
  // flush comments defined prior to import statements
  impt.declarationEnd = this.endStatementPosition;
  impt.declarationSourceEnd = flushCommentsDefinedPriorTo(impt.declarationSourceEnd);
}
protected void consumePackageDeclarationName() {

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

protected void consumeAnnotationTypeMemberDeclaration() {
  // AnnotationTypeMemberDeclaration ::= AnnotationTypeMemberDeclarationHeader AnnotationTypeMemberHeaderExtendedDims DefaultValueopt ';'
  AnnotationMethodDeclaration annotationTypeMemberDeclaration = (AnnotationMethodDeclaration) this.astStack[this.astPtr];
  annotationTypeMemberDeclaration.modifiers |= ExtraCompilerModifiers.AccSemicolonBody;
  // store the this.endPosition (position just before the '}') in case there is
  // a trailing comment behind the end of the method
  int declarationEndPosition = flushCommentsDefinedPriorTo(this.endStatementPosition);
  annotationTypeMemberDeclaration.bodyStart = this.endStatementPosition;
  annotationTypeMemberDeclaration.bodyEnd = declarationEndPosition;
  annotationTypeMemberDeclaration.declarationSourceEnd = declarationEndPosition;
}
protected void consumeAnnotationTypeMemberDeclarations() {

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

protected void consumeAnnotationTypeMemberDeclaration() {
  // AnnotationTypeMemberDeclaration ::= AnnotationTypeMemberDeclarationHeader AnnotationTypeMemberHeaderExtendedDims DefaultValueopt ';'
  AnnotationMethodDeclaration annotationTypeMemberDeclaration = (AnnotationMethodDeclaration) this.astStack[this.astPtr];
  annotationTypeMemberDeclaration.modifiers |= ExtraCompilerModifiers.AccSemicolonBody;
  // store the this.endPosition (position just before the '}') in case there is
  // a trailing comment behind the end of the method
  int declarationEndPosition = flushCommentsDefinedPriorTo(this.endStatementPosition);
  annotationTypeMemberDeclaration.bodyStart = this.endStatementPosition;
  annotationTypeMemberDeclaration.bodyEnd = declarationEndPosition;
  annotationTypeMemberDeclaration.declarationSourceEnd = declarationEndPosition;
}
protected void consumeAnnotationTypeMemberDeclarations() {

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

protected void consumeAnnotationTypeMemberDeclaration() {
  // AnnotationTypeMemberDeclaration ::= AnnotationTypeMemberDeclarationHeader AnnotationTypeMemberHeaderExtendedDims DefaultValueopt ';'
  AnnotationMethodDeclaration annotationTypeMemberDeclaration = (AnnotationMethodDeclaration) this.astStack[this.astPtr];
  annotationTypeMemberDeclaration.modifiers |= ExtraCompilerModifiers.AccSemicolonBody;
  // store the this.endPosition (position just before the '}') in case there is
  // a trailing comment behind the end of the method
  int declarationEndPosition = flushCommentsDefinedPriorTo(this.endStatementPosition);
  annotationTypeMemberDeclaration.bodyStart = this.endStatementPosition;
  annotationTypeMemberDeclaration.bodyEnd = declarationEndPosition;
  annotationTypeMemberDeclaration.declarationSourceEnd = declarationEndPosition;
}
protected void consumeAnnotationTypeMemberDeclarations() {

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

protected void consumePackageDeclaration() {
  // PackageDeclaration ::= 'package' Name ';'
  /* build an ImportRef build from the last name
  stored in the identifier stack. */

  ImportReference impt = this.compilationUnit.currentPackage;
  this.compilationUnit.javadoc = this.javadoc;
  this.javadoc = null;
  // flush comments defined prior to import statements
  impt.declarationEnd = this.endStatementPosition;
  impt.declarationSourceEnd = flushCommentsDefinedPriorTo(impt.declarationSourceEnd);
}
protected void consumePackageDeclarationName() {

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

protected void consumePackageDeclaration() {
  // PackageDeclaration ::= 'package' Name ';'
  /* build an ImportRef build from the last name
  stored in the identifier stack. */

  ImportReference impt = this.compilationUnit.currentPackage;
  this.compilationUnit.javadoc = this.javadoc;
  this.javadoc = null;
  // flush comments defined prior to import statements
  impt.declarationEnd = this.endStatementPosition;
  impt.declarationSourceEnd = flushCommentsDefinedPriorTo(impt.declarationSourceEnd);
}
protected void consumePackageDeclarationName() {

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

protected void consumeAnnotationTypeMemberDeclaration() {
  // AnnotationTypeMemberDeclaration ::= AnnotationTypeMemberDeclarationHeader AnnotationTypeMemberHeaderExtendedDims DefaultValueopt ';'
  AnnotationMethodDeclaration annotationTypeMemberDeclaration = (AnnotationMethodDeclaration) this.astStack[this.astPtr];
  annotationTypeMemberDeclaration.modifiers |= ExtraCompilerModifiers.AccSemicolonBody;
  // store the this.endPosition (position just before the '}') in case there is
  // a trailing comment behind the end of the method
  int declarationEndPosition = flushCommentsDefinedPriorTo(this.endStatementPosition);
  annotationTypeMemberDeclaration.bodyStart = this.endStatementPosition;
  annotationTypeMemberDeclaration.bodyEnd = declarationEndPosition;
  annotationTypeMemberDeclaration.declarationSourceEnd = declarationEndPosition;
}
protected void consumeAnnotationTypeMemberDeclarations() {

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

protected void consumePackageDeclaration() {
  // PackageDeclaration ::= 'package' Name ';'
  /* build an ImportRef build from the last name
  stored in the identifier stack. */

  ImportReference impt = this.compilationUnit.currentPackage;
  this.compilationUnit.javadoc = this.javadoc;
  this.javadoc = null;
  // flush comments defined prior to import statements
  impt.declarationEnd = this.endStatementPosition;
  impt.declarationSourceEnd = flushCommentsDefinedPriorTo(impt.declarationSourceEnd);
}
protected void consumePackageDeclarationName() {

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

protected void consumeAnnotationTypeMemberDeclaration() {
  // AnnotationTypeMemberDeclaration ::= AnnotationTypeMemberDeclarationHeader AnnotationTypeMemberHeaderExtendedDims DefaultValueopt ';'
  AnnotationMethodDeclaration annotationTypeMemberDeclaration = (AnnotationMethodDeclaration) this.astStack[this.astPtr];
  annotationTypeMemberDeclaration.modifiers |= ExtraCompilerModifiers.AccSemicolonBody;
  // store the this.endPosition (position just before the '}') in case there is
  // a trailing comment behind the end of the method
  int declarationEndPosition = flushCommentsDefinedPriorTo(this.endStatementPosition);
  annotationTypeMemberDeclaration.bodyStart = this.endStatementPosition;
  annotationTypeMemberDeclaration.bodyEnd = declarationEndPosition;
  annotationTypeMemberDeclaration.declarationSourceEnd = declarationEndPosition;
}
protected void consumeAnnotationTypeMemberDeclarations() {

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

protected void consumeAnnotationTypeMemberDeclaration() {
  // AnnotationTypeMemberDeclaration ::= AnnotationTypeMemberDeclarationHeader AnnotationTypeMemberHeaderExtendedDims DefaultValueopt ';'
  AnnotationMethodDeclaration annotationTypeMemberDeclaration = (AnnotationMethodDeclaration) this.astStack[this.astPtr];
  annotationTypeMemberDeclaration.modifiers |= ExtraCompilerModifiers.AccSemicolonBody;
  // store the this.endPosition (position just before the '}') in case there is
  // a trailing comment behind the end of the method
  int declarationEndPosition = flushCommentsDefinedPriorTo(this.endStatementPosition);
  annotationTypeMemberDeclaration.bodyStart = this.endStatementPosition;
  annotationTypeMemberDeclaration.bodyEnd = declarationEndPosition;
  annotationTypeMemberDeclaration.declarationSourceEnd = declarationEndPosition;
}
protected void consumeAnnotationTypeMemberDeclarations() {

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

protected void consumePackageDeclaration() {
  // PackageDeclaration ::= 'package' Name ';'
  /* build an ImportRef build from the last name
  stored in the identifier stack. */

  ImportReference impt = this.compilationUnit.currentPackage;
  this.compilationUnit.javadoc = this.javadoc;
  this.javadoc = null;
  // flush comments defined prior to import statements
  impt.declarationEnd = this.endStatementPosition;
  impt.declarationSourceEnd = flushCommentsDefinedPriorTo(impt.declarationSourceEnd);
}
protected void consumePackageDeclarationName() {

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

protected void consumeAnnotationTypeMemberDeclaration() {
  // AnnotationTypeMemberDeclaration ::= AnnotationTypeMemberDeclarationHeader AnnotationTypeMemberHeaderExtendedDims DefaultValueopt ';'
  AnnotationMethodDeclaration annotationTypeMemberDeclaration = (AnnotationMethodDeclaration) this.astStack[this.astPtr];
  annotationTypeMemberDeclaration.modifiers |= ExtraCompilerModifiers.AccSemicolonBody;
  // store the this.endPosition (position just before the '}') in case there is
  // a trailing comment behind the end of the method
  int declarationEndPosition = flushCommentsDefinedPriorTo(this.endStatementPosition);
  annotationTypeMemberDeclaration.bodyStart = this.endStatementPosition;
  annotationTypeMemberDeclaration.bodyEnd = declarationEndPosition;
  annotationTypeMemberDeclaration.declarationSourceEnd = declarationEndPosition;
}
protected void consumeAnnotationTypeMemberDeclarations() {

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

protected void consumeEnumConstantWithClassBody() {
  dispatchDeclarationInto(this.astLengthStack[this.astLengthPtr--]);
  TypeDeclaration anonymousType = (TypeDeclaration) this.astStack[this.astPtr--]; // pop type
  this.astLengthPtr--;
  anonymousType.bodyEnd = this.endPosition;
  anonymousType.declarationSourceEnd = flushCommentsDefinedPriorTo(this.endStatementPosition);
  final FieldDeclaration fieldDeclaration = ((FieldDeclaration) this.astStack[this.astPtr]);
  fieldDeclaration.declarationEnd = this.endStatementPosition;
  fieldDeclaration.declarationSourceEnd = anonymousType.declarationSourceEnd;
  this.intPtr --; // remove end position of the arguments
}
protected void consumeEnumDeclaration() {

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

protected void consumeEmptyTypeDeclaration() {
  // ClassMemberDeclaration ::= ';'
  // InterfaceMemberDeclaration ::= ';'
  // TypeDeclaration ::= ';'
  pushOnAstLengthStack(0);
  if(!this.statementRecoveryActivated) problemReporter().superfluousSemicolon(this.endPosition+1, this.endStatementPosition);
  flushCommentsDefinedPriorTo(this.endStatementPosition);
}
protected void consumeEnhancedForStatement() {

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

protected void consumeEmptyTypeDeclaration() {
  // ClassMemberDeclaration ::= ';'
  // InterfaceMemberDeclaration ::= ';'
  // TypeDeclaration ::= ';'
  pushOnAstLengthStack(0);
  if(!this.statementRecoveryActivated) problemReporter().superfluousSemicolon(this.endPosition+1, this.endStatementPosition);
  flushCommentsDefinedPriorTo(this.endStatementPosition);
}
protected void consumeEnhancedForStatement() {

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

protected void consumeEmptyTypeDeclaration() {
  // ClassMemberDeclaration ::= ';'
  // InterfaceMemberDeclaration ::= ';'
  // TypeDeclaration ::= ';'
  pushOnAstLengthStack(0);
  if(!this.statementRecoveryActivated) problemReporter().superfluousSemicolon(this.endPosition+1, this.endStatementPosition);
  flushCommentsDefinedPriorTo(this.endStatementPosition);
}
protected void consumeEnhancedForStatement() {

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

protected void consumeEmptyTypeDeclaration() {
  // ClassMemberDeclaration ::= ';'
  // InterfaceMemberDeclaration ::= ';'
  // TypeDeclaration ::= ';'
  pushOnAstLengthStack(0);
  if(!this.statementRecoveryActivated) problemReporter().superfluousSemicolon(this.endPosition+1, this.endStatementPosition);
  flushCommentsDefinedPriorTo(this.endStatementPosition);
}
protected void consumeEnhancedForStatement() {

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

protected void consumeEmptyTypeDeclaration() {
  // ClassMemberDeclaration ::= ';'
  // InterfaceMemberDeclaration ::= ';'
  // TypeDeclaration ::= ';'
  pushOnAstLengthStack(0);
  if(!this.statementRecoveryActivated) problemReporter().superfluousSemicolon(this.endPosition+1, this.endStatementPosition);
  flushCommentsDefinedPriorTo(this.endStatementPosition);
}
protected void consumeEnhancedForStatement() {

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

protected void consumeEmptyTypeDeclaration() {
  // ClassMemberDeclaration ::= ';'
  // InterfaceMemberDeclaration ::= ';'
  // TypeDeclaration ::= ';'
  pushOnAstLengthStack(0);
  if(!this.statementRecoveryActivated) problemReporter().superfluousSemicolon(this.endPosition+1, this.endStatementPosition);
  flushCommentsDefinedPriorTo(this.endStatementPosition);
}
protected void consumeEnhancedForStatement() {

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

protected void consumeEmptyTypeDeclaration() {
  // ClassMemberDeclaration ::= ';'
  // InterfaceMemberDeclaration ::= ';'
  // TypeDeclaration ::= ';'
  pushOnAstLengthStack(0);
  if(!this.statementRecoveryActivated) problemReporter().superfluousSemicolon(this.endPosition+1, this.endStatementPosition);
  flushCommentsDefinedPriorTo(this.endStatementPosition);
}
protected void consumeEnhancedForStatement() {

相关文章

Parser类方法