m_blockstack.resize(m_blockstack.size() - 1);
}
+// If we are on a fresh line, close all open one-line scopes.
void ProFileParser::flushScopes(ushort *&tokPtr)
{
if (m_state == StNew) {
}
}
+// If there is a pending conditional, enter a new scope, otherwise flush scopes.
void ProFileParser::flushCond(ushort *&tokPtr)
{
if (m_state == StCond) {
}
BlockScope &top = m_blockstack.top();
if (m_canElse && (!top.special || top.braceLevel)) {
+ // A list of tests (the last one likely with side effects),
+ // but no assignment, scope, etc.
putTok(tokPtr, TokBranch);
// Put empty then block
putBlockLen(tokPtr, 0);
special(other.special), inBranch(other.inBranch) {}
ushort *start; // Where this block started; store length here
int braceLevel; // Nesting of braces in scope
- bool special; // Single-line conditionals cannot have else branches
+ bool special; // Single-line conditionals inside loops, etc. cannot have else branches
bool inBranch; // The 'else' branch of the previous TokBranch is still open
};