1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 18:56:02 +02:00

Minor bug fix.

This commit is contained in:
Sergey Prigogin 2012-03-05 16:06:11 -08:00
parent 3a1214c27a
commit 79dc53a60d

View file

@ -1170,13 +1170,16 @@ public class CodeFormatterVisitor extends ASTVisitor implements ICPPASTVisitor,
* </pre> * </pre>
*/ */
private int visit(ICPPASTUsingDeclaration node) { private int visit(ICPPASTUsingDeclaration node) {
scribe.printNextToken(Token.t_using); int token = peekNextToken();
if (node.isTypename()) { if (token == Token.t_using)
scribe.printNextToken(Token.t_typename, true); scribe.printNextToken(token);
token = peekNextToken();
if (token == Token.t_typename) {
scribe.printNextToken(token, true);
} }
scribe.space(); scribe.space();
node.getName().accept(this); node.getName().accept(this);
int token = peekNextToken(); token = peekNextToken();
if (token == Token.tSEMI) { if (token == Token.tSEMI) {
scribe.printNextToken(token, preferences.insert_space_before_semicolon); scribe.printNextToken(token, preferences.insert_space_before_semicolon);
} }