[muparser] More functions to return errors

Return OptionalError for more functions, allowing for explicit error
handling.
This commit is contained in:
ridiculousfish
2017-11-24 15:12:04 -08:00
parent d97bb3425f
commit 60d9c9fa00
3 changed files with 80 additions and 63 deletions

View File

@@ -220,20 +220,22 @@ class ParserBase {
void ApplyRemainingOprt(ParserStack<token_type> &a_stOpt,
ParserStack<token_type> &a_stVal) const;
void ApplyBinOprt(ParserStack<token_type> &a_stOpt, ParserStack<token_type> &a_stVal) const;
OptionalError ApplyBinOprt(ParserStack<token_type> &a_stOpt,
ParserStack<token_type> &a_stVal) const;
void ApplyIfElse(ParserStack<token_type> &a_stOpt, ParserStack<token_type> &a_stVal) const;
OptionalError ApplyIfElse(ParserStack<token_type> &a_stOpt,
ParserStack<token_type> &a_stVal) const;
void ApplyFunc(ParserStack<token_type> &a_stOpt, ParserStack<token_type> &a_stVal,
int iArgCount) const;
OptionalError ApplyFunc(ParserStack<token_type> &a_stOpt, ParserStack<token_type> &a_stVal,
int iArgCount) const;
token_type ApplyStrFunc(const token_type &a_FunTok,
const std::vector<token_type> &a_vArg) const;
OptionalError ApplyStrFunc(const token_type &a_FunTok,
const std::vector<token_type> &a_vArg) const;
int GetOprtPrecedence(const token_type &a_Tok) const;
EOprtAssociativity GetOprtAssociativity(const token_type &a_Tok) const;
void CreateRPN() const;
OptionalError CreateRPN() const;
ValueOrError ParseString() const;
ValueOrError ParseCmdCode() const;