mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-06 00:25: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$
|
||||
|
||||
/**
|
||||
* Add a subname.
|
||||
* Adds a name segment.
|
||||
*
|
||||
* @param name <code>IASTName</code>
|
||||
* @param name {@code IASTName}
|
||||
*/
|
||||
public void addName(IASTName name);
|
||||
|
||||
/**
|
||||
* Get all subnames.
|
||||
* Returns all name segments.
|
||||
*
|
||||
* @return <code>IASTName []</code>
|
||||
* @return {@code IASTName[]}
|
||||
*/
|
||||
public IASTName[] getNames();
|
||||
|
||||
|
@ -55,15 +55,14 @@ public interface ICPPASTQualifiedName extends IASTName, IASTNameOwner {
|
|||
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
|
||||
*/
|
||||
public void setFullyQualified(boolean value);
|
||||
|
||||
/**
|
||||
* This is used to check if the ICPPASTQualifiedName's last segment is
|
||||
* an ICPPASTConversionName or an ICPPASTOperatorName.
|
||||
* Returns {@code true} if last segment is an ICPPASTConversionName or an ICPPASTOperatorName.
|
||||
*/
|
||||
public boolean isConversionOrOperator();
|
||||
|
||||
|
|
|
@ -71,8 +71,9 @@ public class CPPASTQualifiedName extends CPPASTNameBase
|
|||
@Override
|
||||
public CPPASTQualifiedName copy(CopyStyle style) {
|
||||
CPPASTQualifiedName copy = new CPPASTQualifiedName();
|
||||
for (IASTName name : getNames())
|
||||
for (IASTName name : getNames()) {
|
||||
copy.addName(name == null ? null : name.copy(style));
|
||||
}
|
||||
copy.setFullyQualified(isFullyQualified);
|
||||
copy.setOffsetAndLength(this);
|
||||
if (style == CopyStyle.withLocations) {
|
||||
|
@ -83,20 +84,20 @@ public class CPPASTQualifiedName extends CPPASTNameBase
|
|||
|
||||
@Override
|
||||
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();
|
||||
}
|
||||
|
||||
@Override
|
||||
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();
|
||||
return lastName == null ? null : lastName.resolveBinding();
|
||||
}
|
||||
|
||||
@Override
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -110,7 +111,6 @@ public class CPPASTQualifiedName extends CPPASTNameBase
|
|||
getLastName().setBinding(binding);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addName(IASTName name) {
|
||||
assertNotFrozen();
|
||||
|
@ -200,7 +200,8 @@ public class CPPASTQualifiedName extends CPPASTNameBase
|
|||
for (int i = 0; i <= namesPos; i++) {
|
||||
final IASTName name = names[i];
|
||||
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))
|
||||
return false;
|
||||
} else if (!name.accept(action))
|
||||
|
|
Loading…
Add table
Reference in a new issue