mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-05 16:15:25 +02:00
Cosmetics.
This commit is contained in:
parent
b7f26a90fa
commit
e03dc2bcd1
2 changed files with 13 additions and 13 deletions
|
@ -28,16 +28,16 @@ public interface ICPPASTQualifiedName extends IASTName, IASTNameOwner {
|
||||||
"ICPPASTQualifiedName.SEGMENT_NAME - An IASTName segment"); //$NON-NLS-1$
|
"ICPPASTQualifiedName.SEGMENT_NAME - An IASTName segment"); //$NON-NLS-1$
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a subname.
|
* Adds a name segment.
|
||||||
*
|
*
|
||||||
* @param name <code>IASTName</code>
|
* @param name {@code IASTName}
|
||||||
*/
|
*/
|
||||||
public void addName(IASTName name);
|
public void addName(IASTName name);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get all subnames.
|
* Returns all name segments.
|
||||||
*
|
*
|
||||||
* @return <code>IASTName []</code>
|
* @return {@code IASTName[]}
|
||||||
*/
|
*/
|
||||||
public IASTName[] getNames();
|
public IASTName[] getNames();
|
||||||
|
|
||||||
|
@ -55,15 +55,14 @@ public interface ICPPASTQualifiedName extends IASTName, IASTNameOwner {
|
||||||
public boolean isFullyQualified();
|
public boolean isFullyQualified();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set this name to be fully qualified or not (true/false).
|
* Sets this name to be fully qualified or not (true/false).
|
||||||
*
|
*
|
||||||
* @param value boolean
|
* @param value boolean
|
||||||
*/
|
*/
|
||||||
public void setFullyQualified(boolean value);
|
public void setFullyQualified(boolean value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is used to check if the ICPPASTQualifiedName's last segment is
|
* Returns {@code true} if last segment is an ICPPASTConversionName or an ICPPASTOperatorName.
|
||||||
* an ICPPASTConversionName or an ICPPASTOperatorName.
|
|
||||||
*/
|
*/
|
||||||
public boolean isConversionOrOperator();
|
public boolean isConversionOrOperator();
|
||||||
|
|
||||||
|
|
|
@ -71,8 +71,9 @@ public class CPPASTQualifiedName extends CPPASTNameBase
|
||||||
@Override
|
@Override
|
||||||
public CPPASTQualifiedName copy(CopyStyle style) {
|
public CPPASTQualifiedName copy(CopyStyle style) {
|
||||||
CPPASTQualifiedName copy = new CPPASTQualifiedName();
|
CPPASTQualifiedName copy = new CPPASTQualifiedName();
|
||||||
for (IASTName name : getNames())
|
for (IASTName name : getNames()) {
|
||||||
copy.addName(name == null ? null : name.copy(style));
|
copy.addName(name == null ? null : name.copy(style));
|
||||||
|
}
|
||||||
copy.setFullyQualified(isFullyQualified);
|
copy.setFullyQualified(isFullyQualified);
|
||||||
copy.setOffsetAndLength(this);
|
copy.setOffsetAndLength(this);
|
||||||
if (style == CopyStyle.withLocations) {
|
if (style == CopyStyle.withLocations) {
|
||||||
|
@ -83,20 +84,20 @@ public class CPPASTQualifiedName extends CPPASTNameBase
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final IBinding resolvePreBinding() {
|
public final IBinding resolvePreBinding() {
|
||||||
// The full qualified name resolves to the same thing as the last name
|
// The whole qualified name resolves to the same thing as the last name.
|
||||||
return getLastName().resolvePreBinding();
|
return getLastName().resolvePreBinding();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IBinding resolveBinding() {
|
public IBinding resolveBinding() {
|
||||||
// The full qualified name resolves to the same thing as the last name
|
// The whole qualified name resolves to the same thing as the last name.
|
||||||
IASTName lastName= getLastName();
|
IASTName lastName= getLastName();
|
||||||
return lastName == null ? null : lastName.resolveBinding();
|
return lastName == null ? null : lastName.resolveBinding();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final IBinding getPreBinding() {
|
public final IBinding getPreBinding() {
|
||||||
// The full qualified name resolves to the same thing as the last name
|
// The whole qualified name resolves to the same thing as the last name.
|
||||||
return getLastName().getPreBinding();
|
return getLastName().getPreBinding();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +111,6 @@ public class CPPASTQualifiedName extends CPPASTNameBase
|
||||||
getLastName().setBinding(binding);
|
getLastName().setBinding(binding);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addName(IASTName name) {
|
public void addName(IASTName name) {
|
||||||
assertNotFrozen();
|
assertNotFrozen();
|
||||||
|
@ -200,7 +200,8 @@ public class CPPASTQualifiedName extends CPPASTNameBase
|
||||||
for (int i = 0; i <= namesPos; i++) {
|
for (int i = 0; i <= namesPos; i++) {
|
||||||
final IASTName name = names[i];
|
final IASTName name = names[i];
|
||||||
if (i == namesPos) {
|
if (i == namesPos) {
|
||||||
// pointer-to-member qualified names have a dummy name as the last part of the name, don't visit it
|
// Pointer-to-member qualified names have a dummy name as the last segment
|
||||||
|
// of the name, don't visit it.
|
||||||
if (name.getLookupKey().length > 0 && !name.accept(action))
|
if (name.getLookupKey().length > 0 && !name.accept(action))
|
||||||
return false;
|
return false;
|
||||||
} else if (!name.accept(action))
|
} else if (!name.accept(action))
|
||||||
|
|
Loading…
Add table
Reference in a new issue