[Libreoffice-commits] core.git: starmath/source
Takeshi Abe
tabe at fixedpoint.jp
Mon Apr 10 00:32:29 UTC 2017
starmath/source/parse.cxx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit 6cd854f8ac4d7ae5ed260fa3a983a02fd4fff0fd
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date: Sat Apr 8 19:10:45 2017 +0900
starmath: Assert an impossible error in parsing tables
Change-Id: If7b6080504c1c89bc39bf35bdca264c509f09faf
Reviewed-on: https://gerrit.libreoffice.org/36290
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Takeshi Abe <tabe at fixedpoint.jp>
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 7c69af937df6..6cc18cb47374 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;
More information about the Libreoffice-commits
mailing list