mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-08 16:55:38 +02:00
Cosmetics.
This commit is contained in:
parent
c5df80239f
commit
8153aff8ff
26 changed files with 130 additions and 101 deletions
|
@ -6,8 +6,8 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Doug Schaefer (IBM) - Initial API and implementation
|
||||
* Mike Kucera - cleanup
|
||||
* Doug Schaefer (IBM) - Initial API and implementation
|
||||
* Mike Kucera - cleanup
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast;
|
||||
|
||||
|
@ -21,7 +21,6 @@ package org.eclipse.cdt.core.dom.ast;
|
|||
* @noinstantiate This class is not intended to be instantiated by clients.
|
||||
*/
|
||||
public class ASTNodeProperty {
|
||||
|
||||
private final String name;
|
||||
|
||||
public ASTNodeProperty(String n) {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Sergey Prigogin (Google) - initial API and implementation
|
||||
* Sergey Prigogin (Google) - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast;
|
||||
|
||||
|
@ -16,7 +16,6 @@ import org.eclipse.cdt.core.parser.util.IObjectMatcher;
|
|||
* @noextend This class is not intended to be subclassed by clients.
|
||||
*/
|
||||
public class ASTTypeMatcher implements IObjectMatcher {
|
||||
|
||||
/**
|
||||
* Returns <code>true</code> if the two objects are equal or represent the same type.
|
||||
*/
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* John Camelon (IBM Rational Software) - Initial API and implementation
|
||||
* John Camelon (IBM Rational Software) - Initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast;
|
||||
|
||||
|
@ -17,6 +17,17 @@ package org.eclipse.cdt.core.dom.ast;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface IASTCastExpression extends IASTExpression {
|
||||
/**
|
||||
* <code>TYPE_ID</code> represents the relationship between a cast
|
||||
* expression and the type cast to.
|
||||
*/
|
||||
public static final ASTNodeProperty TYPE_ID = new ASTNodeProperty("IASTCastExpression.TYPE_ID - Type Id expression is cast to"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* <code>OPERAND</code> represents the relationship between a cast
|
||||
* expression and the expression it is casting (operand).
|
||||
*/
|
||||
public static final ASTNodeProperty OPERAND = new ASTNodeProperty("IASTCastExpression.OPERAND - expression being cast"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* <code>op_cast</code> represents a traditional cast.
|
||||
|
@ -42,12 +53,6 @@ public interface IASTCastExpression extends IASTExpression {
|
|||
*/
|
||||
public void setOperator(int value);
|
||||
|
||||
/**
|
||||
* <code>OPERAND</code> represents the relationship between a cast
|
||||
* expression and the expression it is casting (operand).
|
||||
*/
|
||||
public static final ASTNodeProperty OPERAND = new ASTNodeProperty("IASTCastExpression.OPERAND - expression being cast"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Get expression being cast.
|
||||
*
|
||||
|
@ -63,12 +68,6 @@ public interface IASTCastExpression extends IASTExpression {
|
|||
*/
|
||||
public void setOperand(IASTExpression expression);
|
||||
|
||||
/**
|
||||
* <code>TYPE_ID</code> represents the relationship between a cast
|
||||
* expression and the type cast to.
|
||||
*/
|
||||
public static final ASTNodeProperty TYPE_ID = new ASTNodeProperty("IASTCastExpression.TYPE_ID - Type Id expression is cast to"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* Set the typeId.
|
||||
*
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Doug Schaefer (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* Doug Schaefer (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast;
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Doug Schaefer (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* Doug Schaefer (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast;
|
||||
|
||||
|
@ -18,7 +18,6 @@ package org.eclipse.cdt.core.dom.ast;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface IASTFunctionDeclarator extends IASTDeclarator {
|
||||
|
||||
/**
|
||||
* @since 5.1
|
||||
*/
|
||||
|
|
|
@ -17,7 +17,6 @@ package org.eclipse.cdt.core.dom.ast;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface IASTFunctionDefinition extends IASTDeclaration {
|
||||
|
||||
/**
|
||||
* <code>DECL_SPECIFIER</code> represents the relationship between a
|
||||
* <code>IASTFunctionDefinition</code> and its
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Markus Schorn - initial API and implementation
|
||||
* Markus Schorn - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast;
|
||||
|
||||
|
@ -17,7 +17,6 @@ package org.eclipse.cdt.core.dom.ast;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface IASTInitializerClause extends IASTNode {
|
||||
|
||||
@Override
|
||||
IASTInitializerClause copy();
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Doug Schaefer (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* Doug Schaefer (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast;
|
||||
|
||||
|
@ -19,7 +19,6 @@ package org.eclipse.cdt.core.dom.ast;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface IASTInitializerList extends IASTInitializer, IASTInitializerClause {
|
||||
|
||||
public static final ASTNodeProperty NESTED_INITIALIZER = new ASTNodeProperty(
|
||||
"IASTInitializerList.NESTED_INITIALIZER [IASTInitializerClause]"); //$NON-NLS-1$
|
||||
|
||||
|
@ -69,5 +68,4 @@ public interface IASTInitializerList extends IASTInitializer, IASTInitializerCla
|
|||
*/
|
||||
@Deprecated
|
||||
public void addInitializer(IASTInitializer initializer);
|
||||
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Doug Schaefer (IBM) - Initial API and implementation
|
||||
* Doug Schaefer (IBM) - Initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast;
|
||||
|
||||
|
@ -37,13 +37,15 @@ public interface IASTLabelStatement extends IASTStatement, IASTNameOwner {
|
|||
*/
|
||||
public void setName(IASTName name);
|
||||
|
||||
|
||||
/**
|
||||
* Returns the statement following the label.
|
||||
*/
|
||||
public IASTStatement getNestedStatement();
|
||||
|
||||
/**
|
||||
* @param s
|
||||
*/
|
||||
public void setNestedStatement( IASTStatement s );
|
||||
public void setNestedStatement(IASTStatement s);
|
||||
|
||||
/**
|
||||
* @since 5.1
|
||||
|
@ -56,5 +58,4 @@ public interface IASTLabelStatement extends IASTStatement, IASTNameOwner {
|
|||
*/
|
||||
@Override
|
||||
public IASTLabelStatement copy(CopyStyle style);
|
||||
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* IBM - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast;
|
||||
|
||||
|
@ -19,7 +19,6 @@ import org.eclipse.cdt.core.parser.IProblem;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface IASTProblem extends IProblem, IASTNode {
|
||||
|
||||
/**
|
||||
* @since 5.1
|
||||
*/
|
||||
|
|
|
@ -6,19 +6,18 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* John Camelon (IBM) - Initial API and implementation
|
||||
* John Camelon (IBM) - Initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast;
|
||||
|
||||
/**
|
||||
* This interface represents a parse problem where we tried to match against a
|
||||
* expression.
|
||||
* This interface represents a parse problem where we tried to match against
|
||||
* an expression.
|
||||
*
|
||||
* @noextend This interface is not intended to be extended by clients.
|
||||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface IASTProblemExpression extends IASTExpression, IASTProblemHolder {
|
||||
|
||||
/**
|
||||
* @since 5.1
|
||||
*/
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* John Camelon (IBM) - Initial API and implementation
|
||||
* John Camelon (IBM) - Initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast;
|
||||
|
||||
|
@ -38,5 +38,4 @@ public interface IASTProblemHolder {
|
|||
* <code>IASTProblem</code>
|
||||
*/
|
||||
public void setProblem(IASTProblem p);
|
||||
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* John Camelon (IBM Rational Software) - Initial API and implementation
|
||||
* John Camelon (IBM Rational Software) - Initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast;
|
||||
|
||||
|
@ -15,7 +15,6 @@ package org.eclipse.cdt.core.dom.ast;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface IASTTypeId extends IASTNode {
|
||||
|
||||
/**
|
||||
* Constant.
|
||||
*/
|
||||
|
|
|
@ -6,12 +6,11 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* John Camelon (IBM Rational Software) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* John Camelon (IBM Rational Software) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast;
|
||||
|
||||
|
||||
/**
|
||||
* Compound literal: type-id { initializer }
|
||||
*
|
||||
|
@ -20,7 +19,6 @@ package org.eclipse.cdt.core.dom.ast;
|
|||
* @since 5.1
|
||||
*/
|
||||
public interface IASTTypeIdInitializerExpression extends IASTExpression {
|
||||
|
||||
/**
|
||||
* <code>TYPE_ID</code> represents the relationship between an
|
||||
* <code>IASTTypeIdInitializerExpression</code> and
|
||||
|
@ -58,4 +56,10 @@ public interface IASTTypeIdInitializerExpression extends IASTExpression {
|
|||
|
||||
@Override
|
||||
public IASTTypeIdInitializerExpression copy();
|
||||
|
||||
/**
|
||||
* @since 5.4
|
||||
*/
|
||||
@Override
|
||||
public IASTTypeIdInitializerExpression copy(CopyStyle style);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Doug Schaefer (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* Doug Schaefer (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast;
|
||||
|
||||
|
@ -18,6 +18,8 @@ package org.eclipse.cdt.core.dom.ast;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface IVariable extends IBinding {
|
||||
/** @since 5.4 */
|
||||
public static final IVariable[] EMPTY_VARIABLE_ARRAY = {};
|
||||
|
||||
/**
|
||||
* Returns the type of the variable
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* John Camelon (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* John Camelon (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.c;
|
||||
|
||||
|
@ -16,15 +16,14 @@ import org.eclipse.cdt.core.dom.ast.IASTInitializer;
|
|||
import org.eclipse.cdt.core.dom.ast.IASTInitializerClause;
|
||||
|
||||
/**
|
||||
* This interface represents a designated initializer. e.g. struct x y = { .z=4,
|
||||
* .t[1] = 3 };
|
||||
* This interface represents a designated initializer,
|
||||
* e.g. struct x y = { .z = 4, .t[1] = 3 };
|
||||
*
|
||||
* @noextend This interface is not intended to be extended by clients.
|
||||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface ICASTDesignatedInitializer extends IASTInitializer, IASTInitializerClause {
|
||||
|
||||
public static final ICASTDesignator[] EMPTY_DESIGNATOR_ARRAY = new ICASTDesignator[0];
|
||||
public static final ICASTDesignator[] EMPTY_DESIGNATOR_ARRAY = {};
|
||||
|
||||
public static final ASTNodeProperty DESIGNATOR = new ASTNodeProperty(
|
||||
"ICASTDesignatedInitializer.DESIGNATOR [ICASTDesignator]"); //$NON-NLS-1$
|
||||
|
@ -77,5 +76,4 @@ public interface ICASTDesignatedInitializer extends IASTInitializer, IASTInitial
|
|||
*/
|
||||
@Deprecated
|
||||
public void setOperandInitializer(IASTInitializer rhs);
|
||||
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* John Camelon (IBM) - Initial API and implementation
|
||||
* John Camelon (IBM) - Initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||
|
||||
|
@ -19,7 +19,6 @@ import org.eclipse.cdt.core.dom.ast.IASTCastExpression;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface ICPPASTCastExpression extends IASTCastExpression {
|
||||
|
||||
/**
|
||||
* <code>op_dynamic_cast</code> is used for dynamic_cast<>'s.
|
||||
*/
|
||||
|
@ -45,10 +44,15 @@ public interface ICPPASTCastExpression extends IASTCastExpression {
|
|||
*/
|
||||
public static final int op_last = op_const_cast;
|
||||
|
||||
|
||||
/**
|
||||
* @since 5.1
|
||||
*/
|
||||
@Override
|
||||
public ICPPASTCastExpression copy();
|
||||
|
||||
/**
|
||||
* @since 5.4
|
||||
*/
|
||||
@Override
|
||||
public ICPPASTCastExpression copy(CopyStyle style);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Doug Schaefer (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* Doug Schaefer (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||
|
||||
|
@ -24,7 +24,6 @@ import org.eclipse.cdt.core.dom.ast.IASTInitializerList;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface ICPPASTConstructorInitializer extends IASTInitializer {
|
||||
|
||||
/**
|
||||
* @since 5.2
|
||||
*/
|
||||
|
@ -39,6 +38,12 @@ public interface ICPPASTConstructorInitializer extends IASTInitializer {
|
|||
*/
|
||||
public IASTInitializerClause[] getArguments();
|
||||
|
||||
/**
|
||||
* Not allowed on frozen ast.
|
||||
* @since 5.2
|
||||
*/
|
||||
public void setArguments(IASTInitializerClause[] args);
|
||||
|
||||
/**
|
||||
* @since 5.1
|
||||
*/
|
||||
|
@ -51,13 +56,6 @@ public interface ICPPASTConstructorInitializer extends IASTInitializer {
|
|||
@Override
|
||||
public ICPPASTConstructorInitializer copy(CopyStyle style);
|
||||
|
||||
|
||||
/**
|
||||
* Not allowed on frozen ast.
|
||||
* @since 5.2
|
||||
*/
|
||||
public void setArguments(IASTInitializerClause[] args);
|
||||
|
||||
/**
|
||||
* @deprecated Replaced by {@link #getArguments()}.
|
||||
*/
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* John Camelon (IBM) - Initial API and implementation
|
||||
* Mike Kucera (IBM)
|
||||
* John Camelon (IBM) - Initial API and implementation
|
||||
* Mike Kucera (IBM)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||
|
||||
|
@ -22,7 +22,6 @@ import org.eclipse.cdt.core.dom.ast.IASTImplicitNameOwner;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface ICPPASTDeleteExpression extends IASTExpression, IASTImplicitNameOwner {
|
||||
|
||||
/**
|
||||
* <code>OPERAND</code> is the expression representing the pointer being
|
||||
* deleted.
|
||||
|
@ -66,13 +65,12 @@ public interface ICPPASTDeleteExpression extends IASTExpression, IASTImplicitNam
|
|||
public void setIsVectored(boolean vectored);
|
||||
|
||||
/**
|
||||
* Is this a delete [] ?
|
||||
* Is this a delete[] ?
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isVectored();
|
||||
|
||||
|
||||
/**
|
||||
* @since 5.1
|
||||
*/
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* John Camelon (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* Mike Kucera (IBM)
|
||||
* John Camelon (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* Mike Kucera (IBM)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||
|
||||
|
@ -26,7 +26,6 @@ import org.eclipse.cdt.core.dom.ast.IASTTypeId;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface ICPPASTNewExpression extends IASTExpression, IASTImplicitNameOwner {
|
||||
|
||||
public static final ASTNodeProperty NEW_PLACEMENT = new ASTNodeProperty(
|
||||
"ICPPASTNewExpression.NEW_PLACEMENT [IASTExpression]"); //$NON-NLS-1$
|
||||
|
||||
|
@ -83,7 +82,6 @@ public interface ICPPASTNewExpression extends IASTExpression, IASTImplicitNameOw
|
|||
@Override
|
||||
public ICPPASTNewExpression copy(CopyStyle style);
|
||||
|
||||
|
||||
/**
|
||||
* Not allowed on frozen ast.
|
||||
*/
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* John Camelon (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* John Camelon (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* John Camelon (IBM Rational Software) - Initial API and implementation
|
||||
* John Camelon (IBM Rational Software) - Initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.gnu.cpp;
|
||||
|
||||
|
@ -20,7 +20,6 @@ import org.eclipse.cdt.core.dom.ast.cpp.ICPPASTBinaryExpression;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface IGPPASTBinaryExpression extends ICPPASTBinaryExpression {
|
||||
|
||||
/**
|
||||
* <code>op_max</code> represents >?
|
||||
*/
|
||||
|
|
|
@ -6,11 +6,10 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* John Camelon (IBM Corporation) - initial API and implementation
|
||||
* John Camelon (IBM Corporation) - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.parser;
|
||||
|
||||
|
||||
/**
|
||||
* Description of a C/C++ syntax problems and spelling errors as detected by the lexer, preprocessor,
|
||||
* parser or the spelling engine.
|
||||
|
@ -26,8 +25,7 @@ package org.eclipse.cdt.core.parser;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
* @noextend This interface is not intended to be extended by clients.
|
||||
*/
|
||||
public interface IProblem
|
||||
{
|
||||
public interface IProblem {
|
||||
/**
|
||||
* Returns the problem id
|
||||
*/
|
||||
|
@ -79,7 +77,6 @@ public interface IProblem
|
|||
*/
|
||||
boolean isWarning();
|
||||
|
||||
|
||||
/**
|
||||
* -1, returned when an offset or a line number is unknown.
|
||||
*/
|
||||
|
|
|
@ -144,6 +144,27 @@ public abstract class ArrayUtil {
|
|||
return temp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assumes that array contains nulls at the end, only.
|
||||
* Appends object using the current length of the array.
|
||||
* @param array The array to append to. Not {@code null}
|
||||
* @param currentLength The number of non-{@code null} elements in the array
|
||||
* @param obj The object to append. Not {@code null}
|
||||
* @return The modified array, which may be the same as the first parameter.
|
||||
* @since 5.4
|
||||
*/
|
||||
static public <T> T[] appendAt(T[] array, int currentLength, T obj) {
|
||||
if (obj == null)
|
||||
return array;
|
||||
if (currentLength >= array.length) {
|
||||
array = Arrays.copyOf(array, Math.max(Math.max(currentLength + 1, array.length * 2), DEFAULT_LENGTH));
|
||||
}
|
||||
Assert.isTrue(array[currentLength] == null);
|
||||
Assert.isTrue(currentLength == 0 || array[currentLength - 1] != null);
|
||||
array[currentLength]= obj;
|
||||
return array;
|
||||
}
|
||||
|
||||
/**
|
||||
* Trims the given array and returns a new array with no null entries.
|
||||
* Assumes that nulls can be found at the end, only.
|
||||
|
@ -216,6 +237,25 @@ public abstract class ArrayUtil {
|
|||
return trim(array, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Trims the given array and returns a new array with no {@code null} entries.
|
||||
* Assumes that {@code null}s can be found at the end, only.
|
||||
* Similar to {@link #trimAt(Class, Object[], int)}, but uses the new length instead of index.
|
||||
*
|
||||
* @param array the array to be trimmed
|
||||
* @param newLength the new length of the array, has to be less or equal than
|
||||
* the current length.
|
||||
* @return the modified array, which may be the same as the first parameter.
|
||||
* @since 5.4
|
||||
*/
|
||||
static public <T> T[] trim(T[] array, int newLength) {
|
||||
if (newLength == array.length)
|
||||
return array;
|
||||
Assert.isTrue(array[newLength] == null);
|
||||
Assert.isTrue(newLength == 0 || array[newLength - 1] != null);
|
||||
return Arrays.copyOf(array, newLength);
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes contents of the two arrays up to the first <code>null</code> element and concatenates
|
||||
* them.
|
||||
|
@ -446,7 +486,7 @@ public abstract class ArrayUtil {
|
|||
}
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link #trimAt(Class, Object[], int)} instead
|
||||
* @deprecated Use {@link #trim(Object[], int)} or {@link #trimAt(Class, Object[], int)} instead
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Deprecated
|
||||
|
@ -456,10 +496,13 @@ public abstract class ArrayUtil {
|
|||
|
||||
/**
|
||||
* To improve performance, this method should be used instead of
|
||||
* {@link #removeNulls(Class, Object[])} when all of the non-<code>null</code> elements in
|
||||
* {@link #removeNulls(Class, Object[])} when all of the non-{@code null} elements in
|
||||
* the array are grouped together at the beginning of the array and all of the nulls are at
|
||||
* the end of the array. The position of the last non-null element in the array must also
|
||||
* the end of the array. The position of the last non-{@code null} element in the array must also
|
||||
* be known.
|
||||
* <p>
|
||||
* If you don't indend to pass {@code null} array, consider using {@link #trim(Object[], int)}
|
||||
* instead.
|
||||
*
|
||||
* @since 5.1
|
||||
*/
|
||||
|
@ -525,7 +568,7 @@ public abstract class ArrayUtil {
|
|||
System.arraycopy(array, 0, array, 1, i);
|
||||
array[0] = obj;
|
||||
} else {
|
||||
T[] temp = newArray(array, array.length*2);
|
||||
T[] temp = newArray(array, array.length * 2);
|
||||
System.arraycopy(array, 0, temp, 1, array.length);
|
||||
temp[0] = obj;
|
||||
array = temp;
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* John Camelon (IBM Rational Software) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* John Camelon (IBM Rational Software) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.dom.parser.c;
|
||||
|
||||
|
@ -28,7 +28,6 @@ public class CASTCastExpression extends ASTNode implements IASTCastExpression, I
|
|||
private IASTExpression operand;
|
||||
private IASTTypeId typeId;
|
||||
|
||||
|
||||
public CASTCastExpression() {
|
||||
this.operator = op_cast;
|
||||
}
|
||||
|
|
|
@ -30,9 +30,9 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
|
|||
*/
|
||||
public class CPPASTFunctionDeclarator extends CPPASTDeclarator implements ICPPASTFunctionDeclarator,
|
||||
IASTAmbiguityParent {
|
||||
private ICPPASTParameterDeclaration[] parameters = null;
|
||||
private ICPPASTParameterDeclaration[] parameters;
|
||||
private IASTTypeId[] typeIds = NO_EXCEPTION_SPECIFICATION;
|
||||
private IASTTypeId trailingReturnType= null;
|
||||
private IASTTypeId trailingReturnType;
|
||||
|
||||
private boolean varArgs;
|
||||
private boolean pureVirtual;
|
||||
|
@ -40,7 +40,7 @@ public class CPPASTFunctionDeclarator extends CPPASTDeclarator implements ICPPAS
|
|||
private boolean isConst;
|
||||
private boolean isMutable;
|
||||
|
||||
private ICPPFunctionScope scope = null;
|
||||
private ICPPFunctionScope scope;
|
||||
|
||||
public CPPASTFunctionDeclarator() {
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue