* Compute indentation for a preprocessor #if statement. * This may be called for the activeBeautiferStack * instead of the active ASBeautifier object. */
| 1168 | * instead of the active ASBeautifier object. |
| 1169 | */ |
| 1170 | pair<int, int> ASBeautifier::computePreprocessorIndent() |
| 1171 | { |
| 1172 | computePreliminaryIndentation(); |
| 1173 | pair<int, int> entry (indentCount, spaceIndentCount); |
| 1174 | if (!headerStack->empty() |
| 1175 | && entry.first > 0 |
| 1176 | && (headerStack->back() == &AS_IF |
| 1177 | || headerStack->back() == &AS_ELSE |
| 1178 | || headerStack->back() == &AS_FOR |
| 1179 | || headerStack->back() == &AS_WHILE)) |
| 1180 | --entry.first; |
| 1181 | return entry; |
| 1182 | } |
| 1183 | |
| 1184 | /** |
| 1185 | * get distance to the next non-white space, non-comment character in the line. |