| 292 | |
| 293 | |
| 294 | bool cPreprocessor::AtTopLevel() |
| 295 | { |
| 296 | ASSERT(!mStateStack.empty()); |
| 297 | |
| 298 | bool fAtTop; |
| 299 | AcceptState stateSave; |
| 300 | |
| 301 | // save and pop current state |
| 302 | stateSave = mStateStack.top(); |
| 303 | mStateStack.pop(); |
| 304 | |
| 305 | // we're at top level if there was only one item in stack |
| 306 | fAtTop = mStateStack.empty(); |
| 307 | |
| 308 | // return item to stack |
| 309 | mStateStack.push(stateSave); |
| 310 | |
| 311 | return (fAtTop); |
| 312 | } |
| 313 | |
| 314 | // pushes cPreprocessor::STATE_IGNORE onto the state stack if |
| 315 | // strSection is not an acceptable genre for this OS |