| 5150 | //----------------------------------------------------------------------------- |
| 5151 | |
| 5152 | void CodeGenerator::WrapInParensOrCurlys(const BraceKind braceKind, |
| 5153 | void_func_ref lambda, |
| 5154 | const AddSpaceAtTheEnd addSpaceAtTheEnd) |
| 5155 | { |
| 5156 | if(BraceKind::Curlys == braceKind) { |
| 5157 | mOutputFormatHelper.Append('{'); |
| 5158 | } else { |
| 5159 | mOutputFormatHelper.Append('('); |
| 5160 | } |
| 5161 | |
| 5162 | lambda(); |
| 5163 | |
| 5164 | if(BraceKind::Curlys == braceKind) { |
| 5165 | mOutputFormatHelper.Append('}'); |
| 5166 | } else { |
| 5167 | mOutputFormatHelper.Append(')'); |
| 5168 | } |
| 5169 | |
| 5170 | if(AddSpaceAtTheEnd::Yes == addSpaceAtTheEnd) { |
| 5171 | mOutputFormatHelper.Append(' '); |
| 5172 | } |
| 5173 | } |
| 5174 | //----------------------------------------------------------------------------- |
| 5175 | |
| 5176 | void CodeGenerator::WrapInCompoundIfNeeded(const Stmt* stmt, const AddNewLineAfter addNewLineAfter) |
no test coverage detected