private void writeSwitchStatement(IASTSwitchStatement switchStatement) { switchIsNew = true; scribe.print(SWITCH_BRACKET); scribe.noNewLines(); if (switchStatement instanceof ICPPASTSwitchStatement) { ICPPASTSwitchStatement cppSwitchStatement = (ICPPASTSwitchStatement) switchStatement; if (cppSwitchStatement.getControllerDeclaration() == null) { cppSwitchStatement.getControllerExpression().accept(visitor); } else { declWriter.writeDeclaration(cppSwitchStatement.getControllerDeclaration(), false); } } else { switchStatement.getControllerExpression().accept(visitor); } scribe.print(')'); scribe.newLines(); nextCompoundNoNewLine(); writeBodyStatement(switchStatement.getBody(), false); switchIsNew = false; }
protected void writeDeclarationWithoutSemicolon(IASTDeclaration declaration) { declWriter.writeDeclaration(declaration, false); }