diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2017-04-08 19:10:45 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2017-04-10 02:32:08 +0200 |
commit | 6cd854f8ac4d7ae5ed260fa3a983a02fd4fff0fd (patch) | |
tree | 80e2063fc00cee02a4c51819fb7da3bf577e2926 /starmath | |
parent | b377caa14c7fafdc38f6f185c0a01ad58cc620f2 (diff) |
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>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/source/parse.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
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; |