mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-08 00:35:49 +02:00
Cosmetics.
This commit is contained in:
parent
f099336ec8
commit
efa3aab3f2
1 changed files with 49 additions and 46 deletions
|
@ -81,7 +81,7 @@ import org.eclipse.cdt.core.parser.util.CharArrayUtils;
|
|||
import org.eclipse.cdt.internal.core.dom.parser.ASTQueries;
|
||||
|
||||
/**
|
||||
* This is a utility class to help convert AST elements to Strings.
|
||||
* This is a utility class to help convert AST elements to strings.
|
||||
*
|
||||
* @see org.eclipse.cdt.core.dom.ast.ASTTypeUtil
|
||||
*/
|
||||
|
@ -249,16 +249,17 @@ public class ASTStringUtil {
|
|||
|
||||
// get the declSpec
|
||||
final IASTDeclSpecifier declSpec;
|
||||
if (node instanceof IASTParameterDeclaration)
|
||||
if (node instanceof IASTParameterDeclaration) {
|
||||
declSpec= ((IASTParameterDeclaration) node).getDeclSpecifier();
|
||||
else if (node instanceof IASTSimpleDeclaration)
|
||||
} else if (node instanceof IASTSimpleDeclaration) {
|
||||
declSpec= ((IASTSimpleDeclaration) node).getDeclSpecifier();
|
||||
else if (node instanceof IASTFunctionDefinition)
|
||||
} else if (node instanceof IASTFunctionDefinition) {
|
||||
declSpec= ((IASTFunctionDefinition) node).getDeclSpecifier();
|
||||
else if (node instanceof IASTTypeId)
|
||||
} else if (node instanceof IASTTypeId) {
|
||||
declSpec= ((IASTTypeId) node).getDeclSpecifier();
|
||||
else
|
||||
} else {
|
||||
declSpec= null;
|
||||
}
|
||||
|
||||
return appendDeclarationString(buffer, declSpec, declarator, null);
|
||||
}
|
||||
|
@ -678,10 +679,11 @@ public class ASTStringUtil {
|
|||
}
|
||||
|
||||
private static StringBuilder appendQualifiedNameString(StringBuilder buffer, ICPPASTNameSpecifier nameSpec) {
|
||||
if (nameSpec instanceof IASTName)
|
||||
if (nameSpec instanceof IASTName) {
|
||||
appendQualifiedNameString(buffer, (IASTName) nameSpec);
|
||||
else if (nameSpec instanceof ICPPASTDecltypeSpecifier)
|
||||
} else if (nameSpec instanceof ICPPASTDecltypeSpecifier) {
|
||||
appendDecltypeSpecifier(buffer, (ICPPASTDecltypeSpecifier) nameSpec);
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
@ -967,7 +969,7 @@ public class ASTStringUtil {
|
|||
if (!postOperator && !primaryBracketed)
|
||||
buffer.append(getUnaryOperatorString(expression));
|
||||
|
||||
// need to add a space to the unary expression if it is a specific operator
|
||||
// Need to add a space to the unary expression if it is a specific operator.
|
||||
switch (expression.getOperator()) {
|
||||
case IASTUnaryExpression.op_sizeof:
|
||||
case ICPPASTUnaryExpression.op_noexcept:
|
||||
|
@ -1141,7 +1143,8 @@ public class ASTStringUtil {
|
|||
* Returns the String representation of the pack expansion expression.
|
||||
* @param buffer
|
||||
*/
|
||||
private static StringBuilder appendPackExpansionExpression(StringBuilder buffer, ICPPASTPackExpansionExpression expression) {
|
||||
private static StringBuilder appendPackExpansionExpression(StringBuilder buffer,
|
||||
ICPPASTPackExpansionExpression expression) {
|
||||
appendExpressionString(buffer, expression.getPattern());
|
||||
return buffer.append(Keywords.cpELLIPSIS);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue