void MediaQueryBlockWatcher::handleToken(const MediaQueryToken& token) { if (token.blockType() == MediaQueryToken::BlockStart) { ++m_blockLevel; } else if (token.blockType() == MediaQueryToken::BlockEnd) { ASSERT(m_blockLevel); --m_blockLevel; } }
void MediaQueryParser::handleBlocks(const MediaQueryToken& token) { if (token.blockType() == MediaQueryToken::BlockStart && (token.type() != LeftParenthesisToken || m_blockWatcher.blockLevel())) m_state = SkipUntilBlockEnd; }
void MediaQueryParser::skipUntilBlockEnd(MediaQueryTokenType type, const MediaQueryToken& token) { if (token.blockType() == MediaQueryToken::BlockEnd && !m_blockWatcher.blockLevel()) m_state = SkipUntilComma; }