mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Cosmetics.
Change-Id: I7a5e70d05316a74be6b0abe042f8415447563a7e
This commit is contained in:
parent
26d87d7b74
commit
50ae3ff6a8
7 changed files with 27 additions and 33 deletions
|
@ -14,7 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
|
||||||
import org.eclipse.cdt.core.parser.IProblem;
|
import org.eclipse.cdt.core.parser.IProblem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for problems in the ast tree.
|
* Interface for problems in the AST tree.
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -11,14 +11,12 @@
|
||||||
package org.eclipse.cdt.core.dom.ast;
|
package org.eclipse.cdt.core.dom.ast;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This interface represents a parse problem where we tried to match against a
|
* This interface represents a parse problem where we tried to match against a declaration.
|
||||||
* declaration.
|
|
||||||
*
|
*
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface IASTProblemDeclaration extends IASTDeclaration, IASTProblemHolder {
|
public interface IASTProblemDeclaration extends IASTDeclaration, IASTProblemHolder {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 5.1
|
* @since 5.1
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -11,8 +11,7 @@
|
||||||
package org.eclipse.cdt.core.dom.ast;
|
package org.eclipse.cdt.core.dom.ast;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This interface represents a base interface to represent a problem owner or
|
* This interface represents a base interface to represent a problem owner or holder.
|
||||||
* holder.
|
|
||||||
*
|
*
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
|
@ -22,7 +21,8 @@ public interface IASTProblemHolder {
|
||||||
* <code>PROBLEM</code> represents the relationship between a
|
* <code>PROBLEM</code> represents the relationship between a
|
||||||
* <code>IASTProblemHolder</code> and its <code>IASTProblem</code>.
|
* <code>IASTProblemHolder</code> and its <code>IASTProblem</code>.
|
||||||
*/
|
*/
|
||||||
public static final ASTNodeProperty PROBLEM = new ASTNodeProperty("IASTProblemHolder.PROBLEM - IASTProblem for IASTProblemHolder"); //$NON-NLS-1$
|
public static final ASTNodeProperty PROBLEM =
|
||||||
|
new ASTNodeProperty("IASTProblemHolder.PROBLEM - IASTProblem for IASTProblemHolder"); //$NON-NLS-1$
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the problem.
|
* Get the problem.
|
||||||
|
|
|
@ -11,14 +11,12 @@
|
||||||
package org.eclipse.cdt.core.dom.ast;
|
package org.eclipse.cdt.core.dom.ast;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This interface represents a parse problem where we tried to match against a
|
* This interface represents a parse problem where we tried to match against a statement.
|
||||||
* statement.
|
|
||||||
*
|
*
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface IASTProblemStatement extends IASTStatement, IASTProblemHolder {
|
public interface IASTProblemStatement extends IASTStatement, IASTProblemHolder {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 5.1
|
* @since 5.1
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -11,14 +11,12 @@
|
||||||
package org.eclipse.cdt.core.dom.ast;
|
package org.eclipse.cdt.core.dom.ast;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This interface represents a parse problem where we tried to match against a
|
* This interface represents a parse problem where we tried to match against a type-id.
|
||||||
* type-id.
|
|
||||||
*
|
*
|
||||||
* @noextend This interface is not intended to be extended by clients.
|
* @noextend This interface is not intended to be extended by clients.
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface IASTProblemTypeId extends IASTTypeId, IASTProblemHolder {
|
public interface IASTProblemTypeId extends IASTTypeId, IASTProblemHolder {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @since 5.1
|
* @since 5.1
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -17,7 +17,7 @@ package org.eclipse.cdt.core.parser;
|
||||||
* @noimplement This interface is not intended to be implemented by clients.
|
* @noimplement This interface is not intended to be implemented by clients.
|
||||||
*/
|
*/
|
||||||
public interface IToken {
|
public interface IToken {
|
||||||
// getters
|
// Getters.
|
||||||
public int getType();
|
public int getType();
|
||||||
public String getImage();
|
public String getImage();
|
||||||
public char[] getCharImage();
|
public char[] getCharImage();
|
||||||
|
@ -220,34 +220,34 @@ public interface IToken {
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public boolean isOperator();
|
public boolean isOperator();
|
||||||
|
|
||||||
/** @deprecated use {@link #tAND} @noreference This field is not intended to be referenced by clients. */
|
/** @deprecated Use {@link #tAND}. @noreference This field is not intended to be referenced by clients. */
|
||||||
@Deprecated int t_and = 54;
|
@Deprecated int t_and = 54;
|
||||||
/** @deprecated use {@link #tAMPERASSIGN} @noreference This field is not intended to be referenced by clients. */
|
/** @deprecated Use {@link #tAMPERASSIGN}. @noreference This field is not intended to be referenced by clients. */
|
||||||
@Deprecated int t_and_eq = 55;
|
@Deprecated int t_and_eq = 55;
|
||||||
/** @deprecated use {@link #tAMPER} @noreference This field is not intended to be referenced by clients. */
|
/** @deprecated Use {@link #tAMPER}. @noreference This field is not intended to be referenced by clients. */
|
||||||
@Deprecated int t_bitand = 58;
|
@Deprecated int t_bitand = 58;
|
||||||
/** @deprecated use {@link #tBITOR} @noreference This field is not intended to be referenced by clients. */
|
/** @deprecated Use {@link #tBITOR}. @noreference This field is not intended to be referenced by clients. */
|
||||||
@Deprecated int t_bitor = 59;
|
@Deprecated int t_bitor = 59;
|
||||||
/** @deprecated use {@link #tBITCOMPLEMENT} @noreference This field is not intended to be referenced by clients. */
|
/** @deprecated Use {@link #tBITCOMPLEMENT}. @noreference This field is not intended to be referenced by clients. */
|
||||||
@Deprecated int tCOMPL= tBITCOMPLEMENT;
|
@Deprecated int tCOMPL= tBITCOMPLEMENT;
|
||||||
/** @deprecated use {@link #tBITCOMPLEMENT} @noreference This field is not intended to be referenced by clients. */
|
/** @deprecated Use {@link #tBITCOMPLEMENT}. @noreference This field is not intended to be referenced by clients. */
|
||||||
@Deprecated int t_compl = 66;
|
@Deprecated int t_compl = 66;
|
||||||
/** @deprecated use {@link #tNOT} @noreference This field is not intended to be referenced by clients. */
|
/** @deprecated Use {@link #tNOT}. @noreference This field is not intended to be referenced by clients. */
|
||||||
@Deprecated int t_not = 93;
|
@Deprecated int t_not = 93;
|
||||||
/** @deprecated use {@link #tNOTEQUAL} @noreference This field is not intended to be referenced by clients. */
|
/** @deprecated Use {@link #tNOTEQUAL} @noreference This field is not intended to be referenced by clients. */
|
||||||
@Deprecated int t_not_eq = 94;
|
@Deprecated int t_not_eq = 94;
|
||||||
/** @deprecated use {@link #tOR} @noreference This field is not intended to be referenced by clients. */
|
/** @deprecated Use {@link #tOR} @noreference This field is not intended to be referenced by clients. */
|
||||||
@Deprecated int t_or = 96;
|
@Deprecated int t_or = 96;
|
||||||
/** @deprecated use {@link #tBITORASSIGN} @noreference This field is not intended to be referenced by clients. */
|
/** @deprecated Use {@link #tBITORASSIGN}. @noreference This field is not intended to be referenced by clients. */
|
||||||
@Deprecated int t_or_eq = 97;
|
@Deprecated int t_or_eq = 97;
|
||||||
/** @deprecated use {@link #tXOR} @noreference This field is not intended to be referenced by clients. */
|
/** @deprecated Use {@link #tXOR}. @noreference This field is not intended to be referenced by clients. */
|
||||||
@Deprecated int t_xor = 127;
|
@Deprecated int t_xor = 127;
|
||||||
/** @deprecated use {@link #tXORASSIGN} @noreference This field is not intended to be referenced by clients. */
|
/** @deprecated Use {@link #tXORASSIGN}. @noreference This field is not intended to be referenced by clients. */
|
||||||
@Deprecated int t_xor_eq = 128;
|
@Deprecated int t_xor_eq = 128;
|
||||||
/** @deprecated don't use it @noreference This field is not intended to be referenced by clients. */
|
/** @deprecated Not used. @noreference This field is not intended to be referenced by clients. */
|
||||||
@Deprecated int tMACROEXP = 138;
|
@Deprecated int tMACROEXP = 138;
|
||||||
/** @deprecated don't use it @noreference This field is not intended to be referenced by clients. */
|
/** @deprecated Not used. @noreference This field is not intended to be referenced by clients. */
|
||||||
@Deprecated int tCOMMENT = 142;
|
@Deprecated int tCOMMENT = 142;
|
||||||
/** @deprecated don't use it @noreference This field is not intended to be referenced by clients. */
|
/** @deprecated Not used. @noreference This field is not intended to be referenced by clients. */
|
||||||
@Deprecated int tBLOCKCOMMENT = 143;
|
@Deprecated int tBLOCKCOMMENT = 143;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1338,11 +1338,11 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
|
||||||
while (true) {
|
while (true) {
|
||||||
final boolean ok= acceptInactiveCodeBoundary(codeBranchNesting);
|
final boolean ok= acceptInactiveCodeBoundary(codeBranchNesting);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
// we left to an enclosing code branch. If we started in inactive code, it's time to leave.
|
// We left to an enclosing code branch. If we started in inactive code, it's time to leave.
|
||||||
if (!wasActive)
|
if (!wasActive)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// if we started in active code, we need to skip the outer and therefore unrelated
|
// If we started in active code, we need to skip the outer and therefore unrelated
|
||||||
// inactive branches until we hit active code again.
|
// inactive branches until we hit active code again.
|
||||||
try {
|
try {
|
||||||
skipInactiveCode();
|
skipInactiveCode();
|
||||||
|
@ -1351,7 +1351,7 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
|
||||||
}
|
}
|
||||||
codeBranchNesting= Math.min(getCodeBranchNesting() + 1, codeBranchNesting);
|
codeBranchNesting= Math.min(getCodeBranchNesting() + 1, codeBranchNesting);
|
||||||
|
|
||||||
// we could be at the start of inactive code so restart the loop
|
// We could be at the start of inactive code so restart the loop.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1366,7 +1366,7 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser {
|
||||||
|
|
||||||
final int offset = next.getOffset();
|
final int offset = next.getOffset();
|
||||||
declarationMark= next;
|
declarationMark= next;
|
||||||
next= null; // don't hold on to the token while parsing namespaces, class bodies, etc.
|
next= null; // Don't hold on to the token while parsing namespaces, class bodies, etc.
|
||||||
try {
|
try {
|
||||||
IASTDeclaration declaration= declaration(options);
|
IASTDeclaration declaration= declaration(options);
|
||||||
if (((ASTNode) declaration).getLength() == 0 && LTcatchEOF(1) != IToken.tEOC) {
|
if (((ASTNode) declaration).getLength() == 0 && LTcatchEOF(1) != IToken.tEOC) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue