mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
@Override annotations.
This commit is contained in:
parent
29d3e83da0
commit
d5f46dd429
9 changed files with 110 additions and 78 deletions
|
@ -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;
|
||||
|
||||
|
@ -17,7 +17,6 @@ package org.eclipse.cdt.core.dom.ast;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface IASTArrayDeclarator extends IASTDeclarator {
|
||||
|
||||
/**
|
||||
* Node property that describes the relationship between an
|
||||
* <code>IASTArrayDeclarator</code> and an <code>IASTArrayModifier</code>.
|
||||
|
@ -43,11 +42,13 @@ public interface IASTArrayDeclarator extends IASTDeclarator {
|
|||
/**
|
||||
* @since 5.1
|
||||
*/
|
||||
@Override
|
||||
public IASTArrayDeclarator copy();
|
||||
|
||||
/**
|
||||
* @since 5.3
|
||||
*/
|
||||
@Override
|
||||
public IASTArrayDeclarator copy(CopyStyle style);
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
@ -18,7 +18,6 @@ package org.eclipse.cdt.core.dom.ast;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface IASTArrayModifier extends IASTNode {
|
||||
|
||||
/**
|
||||
* Node property that describes the relationship between an
|
||||
* <code>IASTArrayModifier</code> and an <code>IASTExpression</code>.
|
||||
|
@ -49,10 +48,12 @@ public interface IASTArrayModifier extends IASTNode {
|
|||
/**
|
||||
* @since 5.1
|
||||
*/
|
||||
@Override
|
||||
public IASTArrayModifier copy();
|
||||
|
||||
/**
|
||||
* @since 5.3
|
||||
*/
|
||||
@Override
|
||||
public IASTArrayModifier copy(CopyStyle style);
|
||||
}
|
||||
|
|
|
@ -6,34 +6,23 @@
|
|||
* 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;
|
||||
|
||||
/**
|
||||
* This interface represents a postfix array subscript expression. x[ 10 ]
|
||||
* y.z()[ t * t ]
|
||||
* This interface represents a postfix array subscript expression. x[10]
|
||||
* y.z()[t * t]
|
||||
*
|
||||
* @noextend This interface is not intended to be extended by clients.
|
||||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface IASTArraySubscriptExpression extends IASTExpression {
|
||||
|
||||
public static final ASTNodeProperty ARRAY = new ASTNodeProperty(
|
||||
"IASTArraySubscriptExpression.ARRAY [IASTExpression]"); //$NON-NLS-1$
|
||||
public static final ASTNodeProperty SUBSCRIPT = new ASTNodeProperty(
|
||||
"IASTArraySubscriptExpression.SUBSCRIPT - [IASTFunctionArgument]"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* @since 5.1
|
||||
*/
|
||||
IASTArraySubscriptExpression copy();
|
||||
|
||||
/**
|
||||
* @since 5.3
|
||||
*/
|
||||
IASTArraySubscriptExpression copy(CopyStyle style);
|
||||
|
||||
/**
|
||||
* Get the expression that represents the array
|
||||
*
|
||||
|
@ -74,4 +63,16 @@ public interface IASTArraySubscriptExpression extends IASTExpression {
|
|||
*/
|
||||
@Deprecated
|
||||
public void setSubscriptExpression(IASTExpression expression);
|
||||
|
||||
/**
|
||||
* @since 5.1
|
||||
*/
|
||||
@Override
|
||||
IASTArraySubscriptExpression copy();
|
||||
|
||||
/**
|
||||
* @since 5.3
|
||||
*/
|
||||
@Override
|
||||
IASTArraySubscriptExpression copy(CopyStyle style);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
@ -17,7 +17,6 @@ package org.eclipse.cdt.core.dom.ast;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface IASTPointer extends IASTPointerOperator {
|
||||
|
||||
/**
|
||||
* Returns whether the pointer is const qualified.
|
||||
*/
|
||||
|
@ -53,10 +52,12 @@ public interface IASTPointer extends IASTPointerOperator {
|
|||
/**
|
||||
* @since 5.1
|
||||
*/
|
||||
@Override
|
||||
public IASTPointer copy();
|
||||
|
||||
/**
|
||||
* @since 5.3
|
||||
*/
|
||||
@Override
|
||||
public IASTPointer copy(CopyStyle style);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Rational Software - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* IBM Rational Software - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.dom.parser.c;
|
||||
|
||||
|
@ -22,9 +22,8 @@ import org.eclipse.cdt.core.parser.util.ArrayUtil;
|
|||
* @author jcamelon
|
||||
*/
|
||||
public class CASTArrayDeclarator extends CASTDeclarator implements IASTArrayDeclarator {
|
||||
|
||||
private IASTArrayModifier [] arrayMods = null;
|
||||
private int arrayModsPos=-1;
|
||||
private IASTArrayModifier[] arrayMods = null;
|
||||
private int arrayModsPos = -1;
|
||||
|
||||
public CASTArrayDeclarator() {
|
||||
}
|
||||
|
@ -46,7 +45,7 @@ public class CASTArrayDeclarator extends CASTDeclarator implements IASTArrayDecl
|
|||
public CASTArrayDeclarator copy(CopyStyle style) {
|
||||
CASTArrayDeclarator copy = new CASTArrayDeclarator();
|
||||
copyBaseDeclarator(copy, style);
|
||||
for(IASTArrayModifier modifier : getArrayModifiers())
|
||||
for (IASTArrayModifier modifier : getArrayModifiers())
|
||||
copy.addArrayModifier(modifier == null ? null : modifier.copy());
|
||||
if (style == CopyStyle.withLocations) {
|
||||
copy.setCopyLocation(this);
|
||||
|
@ -54,19 +53,24 @@ public class CASTArrayDeclarator extends CASTDeclarator implements IASTArrayDecl
|
|||
return copy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IASTArrayModifier[] getArrayModifiers() {
|
||||
if( arrayMods == null ) return IASTArrayModifier.EMPTY_ARRAY;
|
||||
arrayMods = (IASTArrayModifier[]) ArrayUtil.removeNullsAfter( IASTArrayModifier.class, arrayMods, arrayModsPos );
|
||||
if (arrayMods == null)
|
||||
return IASTArrayModifier.EMPTY_ARRAY;
|
||||
arrayMods = (IASTArrayModifier[]) ArrayUtil.removeNullsAfter(IASTArrayModifier.class,
|
||||
arrayMods, arrayModsPos);
|
||||
return arrayMods;
|
||||
|
||||
}
|
||||
|
||||
public void addArrayModifier(IASTArrayModifier arrayModifier) {
|
||||
@Override
|
||||
public void addArrayModifier(IASTArrayModifier arrayModifier) {
|
||||
assertNotFrozen();
|
||||
if (arrayModifier != null) {
|
||||
arrayModifier.setParent(this);
|
||||
arrayModifier.setPropertyInParent(ARRAY_MODIFIER);
|
||||
arrayMods = (IASTArrayModifier[]) ArrayUtil.append( IASTArrayModifier.class, arrayMods, ++arrayModsPos, arrayModifier );
|
||||
arrayMods = (IASTArrayModifier[]) ArrayUtil.append(IASTArrayModifier.class, arrayMods,
|
||||
++arrayModsPos, arrayModifier);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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.internal.core.dom.parser.cpp;
|
||||
|
||||
|
@ -22,11 +22,9 @@ import org.eclipse.cdt.core.parser.util.ArrayUtil;
|
|||
* Array declarator for c++.
|
||||
*/
|
||||
public class CPPASTArrayDeclarator extends CPPASTDeclarator implements ICPPASTArrayDeclarator {
|
||||
|
||||
private IASTArrayModifier [] arrayMods = null;
|
||||
private int arrayModsPos=-1;
|
||||
private IASTArrayModifier[] arrayMods = null;
|
||||
private int arrayModsPos = -1;
|
||||
|
||||
|
||||
public CPPASTArrayDeclarator(IASTName name, IASTInitializer initializer) {
|
||||
super(name, initializer);
|
||||
}
|
||||
|
@ -34,8 +32,7 @@ public class CPPASTArrayDeclarator extends CPPASTDeclarator implements ICPPASTAr
|
|||
public CPPASTArrayDeclarator(IASTName name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public CPPASTArrayDeclarator() {
|
||||
}
|
||||
|
||||
|
@ -43,7 +40,6 @@ public class CPPASTArrayDeclarator extends CPPASTDeclarator implements ICPPASTAr
|
|||
public CPPASTArrayDeclarator copy() {
|
||||
return copy(CopyStyle.withoutLocations);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public CPPASTArrayDeclarator copy(CopyStyle style) {
|
||||
|
@ -57,22 +53,27 @@ public class CPPASTArrayDeclarator extends CPPASTDeclarator implements ICPPASTAr
|
|||
}
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IASTArrayModifier[] getArrayModifiers() {
|
||||
if( arrayMods == null ) return IASTArrayModifier.EMPTY_ARRAY;
|
||||
arrayMods = (IASTArrayModifier[]) ArrayUtil.removeNullsAfter( IASTArrayModifier.class, arrayMods, arrayModsPos );
|
||||
if (arrayMods == null)
|
||||
return IASTArrayModifier.EMPTY_ARRAY;
|
||||
arrayMods = (IASTArrayModifier[]) ArrayUtil.removeNullsAfter(IASTArrayModifier.class,
|
||||
arrayMods, arrayModsPos);
|
||||
return arrayMods;
|
||||
}
|
||||
|
||||
public void addArrayModifier(IASTArrayModifier arrayModifier) {
|
||||
@Override
|
||||
public void addArrayModifier(IASTArrayModifier arrayModifier) {
|
||||
assertNotFrozen();
|
||||
if (arrayModifier != null) {
|
||||
arrayMods = (IASTArrayModifier[]) ArrayUtil.append( IASTArrayModifier.class, arrayMods, ++arrayModsPos, arrayModifier );
|
||||
arrayMods = (IASTArrayModifier[]) ArrayUtil.append(IASTArrayModifier.class, arrayMods,
|
||||
++arrayModsPos, arrayModifier);
|
||||
arrayModifier.setParent(this);
|
||||
arrayModifier.setPropertyInParent(ARRAY_MODIFIER);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean postAccept(ASTVisitor action) {
|
||||
IASTArrayModifier[] mods = getArrayModifiers();
|
||||
|
|
|
@ -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.internal.core.dom.parser.cpp;
|
||||
|
||||
|
@ -22,7 +22,6 @@ import org.eclipse.cdt.internal.core.dom.parser.IASTAmbiguityParent;
|
|||
* @author jcamelon
|
||||
*/
|
||||
public class CPPASTArrayModifier extends ASTNode implements IASTArrayModifier, IASTAmbiguityParent {
|
||||
|
||||
private IASTExpression exp;
|
||||
|
||||
public CPPASTArrayModifier() {
|
||||
|
@ -32,14 +31,17 @@ public class CPPASTArrayModifier extends ASTNode implements IASTArrayModifier, I
|
|||
setConstantExpression(exp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IASTExpression getConstantExpression() {
|
||||
return exp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CPPASTArrayModifier copy() {
|
||||
return copy(CopyStyle.withoutLocations);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CPPASTArrayModifier copy(CopyStyle style) {
|
||||
CPPASTArrayModifier copy = new CPPASTArrayModifier(exp == null ? null : exp.copy(style));
|
||||
copy.setOffsetAndLength(this);
|
||||
|
@ -49,7 +51,8 @@ public class CPPASTArrayModifier extends ASTNode implements IASTArrayModifier, I
|
|||
return copy;
|
||||
}
|
||||
|
||||
public void setConstantExpression(IASTExpression expression) {
|
||||
@Override
|
||||
public void setConstantExpression(IASTExpression expression) {
|
||||
assertNotFrozen();
|
||||
exp = expression;
|
||||
if (expression != null) {
|
||||
|
@ -62,9 +65,9 @@ public class CPPASTArrayModifier extends ASTNode implements IASTArrayModifier, I
|
|||
public boolean accept(ASTVisitor action) {
|
||||
if (action.shouldVisitArrayModifiers) {
|
||||
switch (action.visit(this)) {
|
||||
case ASTVisitor.PROCESS_ABORT : return false;
|
||||
case ASTVisitor.PROCESS_SKIP : return true;
|
||||
default : break;
|
||||
case ASTVisitor.PROCESS_ABORT: return false;
|
||||
case ASTVisitor.PROCESS_SKIP: return true;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
if (exp != null && !exp.accept(action))
|
||||
|
@ -76,7 +79,8 @@ public class CPPASTArrayModifier extends ASTNode implements IASTArrayModifier, I
|
|||
return true;
|
||||
}
|
||||
|
||||
public void replace(IASTNode child, IASTNode other) {
|
||||
@Override
|
||||
public void replace(IASTNode child, IASTNode other) {
|
||||
if (child == exp) {
|
||||
other.setPropertyInParent(child.getPropertyInParent());
|
||||
other.setParent(child.getParent());
|
||||
|
|
|
@ -37,13 +37,13 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.Conversions;
|
|||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExpressionTypes;
|
||||
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SemanticUtil;
|
||||
|
||||
public class CPPASTArraySubscriptExpression extends ASTNode implements ICPPASTArraySubscriptExpression, IASTAmbiguityParent {
|
||||
|
||||
public class CPPASTArraySubscriptExpression extends ASTNode
|
||||
implements ICPPASTArraySubscriptExpression, IASTAmbiguityParent {
|
||||
private IASTExpression arrayExpression;
|
||||
private IASTInitializerClause subscriptExp;
|
||||
private ICPPFunction overload= UNINITIALIZED_FUNCTION;
|
||||
|
||||
private IASTImplicitName[] implicitNames = null;
|
||||
private IASTImplicitName[] implicitNames;
|
||||
|
||||
public CPPASTArraySubscriptExpression() {
|
||||
}
|
||||
|
@ -53,10 +53,12 @@ public class CPPASTArraySubscriptExpression extends ASTNode implements ICPPASTAr
|
|||
setArgument(operand);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CPPASTArraySubscriptExpression copy() {
|
||||
return copy(CopyStyle.withoutLocations);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CPPASTArraySubscriptExpression copy(CopyStyle style) {
|
||||
CPPASTArraySubscriptExpression copy = new CPPASTArraySubscriptExpression();
|
||||
copy.setArrayExpression(arrayExpression == null ? null : arrayExpression.copy(style));
|
||||
|
@ -68,11 +70,13 @@ public class CPPASTArraySubscriptExpression extends ASTNode implements ICPPASTAr
|
|||
return copy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IASTExpression getArrayExpression() {
|
||||
return arrayExpression;
|
||||
}
|
||||
|
||||
public void setArrayExpression(IASTExpression expression) {
|
||||
@Override
|
||||
public void setArrayExpression(IASTExpression expression) {
|
||||
assertNotFrozen();
|
||||
arrayExpression = expression;
|
||||
if (expression != null) {
|
||||
|
@ -81,11 +85,13 @@ public class CPPASTArraySubscriptExpression extends ASTNode implements ICPPASTAr
|
|||
}
|
||||
}
|
||||
|
||||
public IASTInitializerClause getArgument() {
|
||||
@Override
|
||||
public IASTInitializerClause getArgument() {
|
||||
return subscriptExp;
|
||||
}
|
||||
|
||||
public void setArgument(IASTInitializerClause arg) {
|
||||
@Override
|
||||
public void setArgument(IASTInitializerClause arg) {
|
||||
assertNotFrozen();
|
||||
subscriptExp = arg;
|
||||
if (arg != null) {
|
||||
|
@ -94,19 +100,22 @@ public class CPPASTArraySubscriptExpression extends ASTNode implements ICPPASTAr
|
|||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
@Deprecated
|
||||
public IASTExpression getSubscriptExpression() {
|
||||
if (subscriptExp instanceof IASTExpression)
|
||||
return (IASTExpression) subscriptExp;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
@Deprecated
|
||||
public void setSubscriptExpression(IASTExpression expression) {
|
||||
setArgument(expression);
|
||||
}
|
||||
|
||||
public IASTImplicitName[] getImplicitNames() {
|
||||
@Override
|
||||
public IASTImplicitName[] getImplicitNames() {
|
||||
if (implicitNames == null) {
|
||||
ICPPFunction overload = getOverload();
|
||||
if (overload == null || overload instanceof CPPImplicitFunction)
|
||||
|
@ -127,8 +136,7 @@ public class CPPASTArraySubscriptExpression extends ASTNode implements ICPPASTAr
|
|||
|
||||
return implicitNames;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ICPPFunction getOverload() {
|
||||
if (overload == UNINITIALIZED_FUNCTION) {
|
||||
overload= null;
|
||||
|
@ -174,7 +182,8 @@ public class CPPASTArraySubscriptExpression extends ASTNode implements ICPPASTAr
|
|||
return true;
|
||||
}
|
||||
|
||||
public void replace(IASTNode child, IASTNode other) {
|
||||
@Override
|
||||
public void replace(IASTNode child, IASTNode other) {
|
||||
if (child == subscriptExp) {
|
||||
other.setPropertyInParent(child.getPropertyInParent());
|
||||
other.setParent(child.getParent());
|
||||
|
@ -187,7 +196,8 @@ public class CPPASTArraySubscriptExpression extends ASTNode implements ICPPASTAr
|
|||
}
|
||||
}
|
||||
|
||||
public IType getExpressionType() {
|
||||
@Override
|
||||
public IType getExpressionType() {
|
||||
ICPPFunction op = getOverload();
|
||||
if (op != null) {
|
||||
return ExpressionTypes.typeFromFunctionCall(op);
|
||||
|
@ -216,10 +226,12 @@ public class CPPASTArraySubscriptExpression extends ASTNode implements ICPPASTAr
|
|||
return new ProblemType(ISemanticProblem.TYPE_UNKNOWN_FOR_EXPRESSION);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isLValue() {
|
||||
return getValueCategory() == LVALUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ValueCategory getValueCategory() {
|
||||
ICPPFunction op = getOverload();
|
||||
if (op != null) {
|
||||
|
|
|
@ -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.internal.core.dom.parser.cpp;
|
||||
|
||||
|
@ -19,7 +19,6 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
|
|||
* A pointer operator of a declarator
|
||||
*/
|
||||
public class CPPASTPointer extends ASTNode implements IASTPointer {
|
||||
|
||||
private boolean isConst;
|
||||
private boolean isVolatile;
|
||||
private boolean isRestrict;
|
||||
|
@ -27,10 +26,12 @@ public class CPPASTPointer extends ASTNode implements IASTPointer {
|
|||
public CPPASTPointer() {
|
||||
}
|
||||
|
||||
public CPPASTPointer copy() {
|
||||
@Override
|
||||
public CPPASTPointer copy() {
|
||||
return copy(CopyStyle.withoutLocations);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CPPASTPointer copy(CopyStyle style) {
|
||||
CPPASTPointer copy = new CPPASTPointer();
|
||||
copy.isConst = isConst;
|
||||
|
@ -43,29 +44,35 @@ public class CPPASTPointer extends ASTNode implements IASTPointer {
|
|||
return copy;
|
||||
}
|
||||
|
||||
public boolean isConst() {
|
||||
@Override
|
||||
public boolean isConst() {
|
||||
return isConst;
|
||||
}
|
||||
|
||||
public boolean isVolatile() {
|
||||
@Override
|
||||
public boolean isVolatile() {
|
||||
return isVolatile;
|
||||
}
|
||||
|
||||
public boolean isRestrict() {
|
||||
@Override
|
||||
public boolean isRestrict() {
|
||||
return isRestrict;
|
||||
}
|
||||
|
||||
public void setConst(boolean value) {
|
||||
@Override
|
||||
public void setConst(boolean value) {
|
||||
assertNotFrozen();
|
||||
isConst = value;
|
||||
}
|
||||
|
||||
public void setVolatile(boolean value) {
|
||||
@Override
|
||||
public void setVolatile(boolean value) {
|
||||
assertNotFrozen();
|
||||
isVolatile = value;
|
||||
}
|
||||
|
||||
public void setRestrict(boolean value) {
|
||||
@Override
|
||||
public void setRestrict(boolean value) {
|
||||
assertNotFrozen();
|
||||
isRestrict = value;
|
||||
}
|
||||
|
@ -74,8 +81,8 @@ public class CPPASTPointer extends ASTNode implements IASTPointer {
|
|||
public boolean accept(ASTVisitor action) {
|
||||
if (action.shouldVisitPointerOperators) {
|
||||
switch (action.visit(this)) {
|
||||
case ASTVisitor.PROCESS_ABORT : return false;
|
||||
case ASTVisitor.PROCESS_SKIP : return true;
|
||||
case ASTVisitor.PROCESS_ABORT: return false;
|
||||
case ASTVisitor.PROCESS_SKIP: return true;
|
||||
}
|
||||
if (action.leave(this) == ASTVisitor.PROCESS_ABORT)
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue