starmath: Assert an impossible error in parsing tables
Change-Id: If7b6080504c1c89bc39bf35bdca264c509f09faf
Reviewed-on: https://gerrit.libreoffice.org/36290
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 7c69af9..6cc18cb 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -949,10 +949,7 @@ SmTableNode *SmParser::DoTable()
NextToken();
aLineArray.push_back(DoLine());
}
if (m_aCurToken.eType != TEND)
aLineArray.push_back(DoError(SmParseError::UnexpectedChar));
assert(m_aCurToken.eType == TEND);
std::unique_ptr<SmTableNode> pSNode(new SmTableNode(m_aCurToken));
pSNode->SetSubNodes(aLineArray);
return pSNode.release();
@@ -984,6 +981,7 @@ SmNode *SmParser::DoAlign(bool bUseExtraSpaces)
return pNode.release();
}
// Postcondition: m_aCurToken.eType == TEND || m_aCurToken.eType == TNEWLINE
SmLineNode *SmParser::DoLine()
{
SmNodeArray ExpressionArray;