starmath: Replace SmParseError::FuncExpected with assertion

Change-Id: I7d1089fd615ac09a6e59c06c094f79364510b290
Reviewed-on: https://gerrit.libreoffice.org/34800
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
This commit is contained in:
Takeshi Abe
2017-03-02 16:09:49 +09:00
parent cedac0b9b0
commit dabcb80966
4 changed files with 2 additions and 10 deletions

View File

@@ -28,7 +28,6 @@ enum class SmParseError
None, None,
UnexpectedChar, UnexpectedChar,
UnexpectedToken, UnexpectedToken,
FuncExpected,
PoundExpected, PoundExpected,
ColorExpected, ColorExpected,
LgroupExpected, LgroupExpected,

View File

@@ -132,8 +132,7 @@
#define RID_ERR_RGROUPEXPECTED (RID_APP_START + 924) #define RID_ERR_RGROUPEXPECTED (RID_APP_START + 924)
#define RID_ERR_LBRACEEXPECTED (RID_APP_START + 925) #define RID_ERR_LBRACEEXPECTED (RID_APP_START + 925)
#define RID_ERR_RBRACEEXPECTED (RID_APP_START + 926) #define RID_ERR_RBRACEEXPECTED (RID_APP_START + 926)
#define RID_ERR_FUNCEXPECTED (RID_APP_START + 927) // blank: 927 - 931
// blank: 928 - 931
#define RID_ERR_POUNDEXPECTED (RID_APP_START + 932) #define RID_ERR_POUNDEXPECTED (RID_APP_START + 932)
#define RID_ERR_COLOREXPECTED (RID_APP_START + 933) #define RID_ERR_COLOREXPECTED (RID_APP_START + 933)
#define RID_ERR_LPARENTEXPECTED (RID_APP_START + 934) #define RID_ERR_LPARENTEXPECTED (RID_APP_START + 934)

View File

@@ -2097,7 +2097,7 @@ void SmParser::DoFunction()
break; break;
default: default:
Error(SmParseError::FuncExpected); assert(false);
} }
} }
@@ -2345,7 +2345,6 @@ void SmParser::AddError(SmParseError Type, SmNode *pNode)
case SmParseError::RgroupExpected: nRID = RID_ERR_RGROUPEXPECTED; break; case SmParseError::RgroupExpected: nRID = RID_ERR_RGROUPEXPECTED; break;
case SmParseError::LbraceExpected: nRID = RID_ERR_LBRACEEXPECTED; break; case SmParseError::LbraceExpected: nRID = RID_ERR_LBRACEEXPECTED; break;
case SmParseError::RbraceExpected: nRID = RID_ERR_RBRACEEXPECTED; break; case SmParseError::RbraceExpected: nRID = RID_ERR_RBRACEEXPECTED; break;
case SmParseError::FuncExpected: nRID = RID_ERR_FUNCEXPECTED; break;
case SmParseError::PoundExpected: nRID = RID_ERR_POUNDEXPECTED; break; case SmParseError::PoundExpected: nRID = RID_ERR_POUNDEXPECTED; break;
case SmParseError::ColorExpected: nRID = RID_ERR_COLOREXPECTED; break; case SmParseError::ColorExpected: nRID = RID_ERR_COLOREXPECTED; break;
case SmParseError::RightExpected: nRID = RID_ERR_RIGHTEXPECTED; break; case SmParseError::RightExpected: nRID = RID_ERR_RIGHTEXPECTED; break;

View File

@@ -196,11 +196,6 @@ String RID_ERR_RBRACEEXPECTED
Text [ en-US ] = "')' expected" ; Text [ en-US ] = "')' expected" ;
}; };
String RID_ERR_FUNCEXPECTED
{
Text [ en-US ] = "Function expected" ;
};
String RID_ERR_POUNDEXPECTED String RID_ERR_POUNDEXPECTED
{ {
Text [ en-US ] = "'#' expected" ; Text [ en-US ] = "'#' expected" ;