Arg arg = getFullArg('[', ']');
if (arg.first)
return '[' + arg.second + ']';
- return arg.second;
+ return string();
}
return res.empty() ? string() : '[' + res + ']';
}
+
string Parser::getFullParentheseArg()
{
Arg arg = getFullArg('(', ')');
if (arg.first)
return '(' + arg.second + ')';
- return arg.second;
+ return string();
}
+
string const Parser::verbatimEnvironment(string const & name)
{
if (!good())
std::string getArg(char left, char right);
/*!
* \returns getFullArg('[', ']') including the brackets or the
- * empty string if no argument was found.
+ * empty string if there is no such argument.
*/
std::string getFullOpt();
- /// \returns getArg('[', ']') including the brackets
+ /*!
+ * \returns getArg('[', ']') including the brackets or the
+ * empty string if there is no such argument.
+ */
std::string getOpt();
+ /*!
+ * \returns getFullArg('(', ')') including the parentheses or the
+ * empty string if there is no such argument.
+ */
+ std::string getFullParentheseArg();
/*!
* \returns the contents of the environment \p name.
* <tt>\begin{name}</tt> must be parsed already, <tt>\end{name}</tt>
* is parsed but not returned.
*/
- std::string getFullParentheseArg();
- /// \returns getArg('(', ')') including the parentheses
std::string const verbatimEnvironment(std::string const & name);
- /// Returns the character of the current token and increments the token position.
+ /*!
+ * Returns the character of the current token and increments
+ * the token position.
+ */
char getChar();
///
void error(std::string const & msg);