requires is a keyword in C++2a

This commit is contained in:
Richard Kimberly Heck 2020-05-03 02:18:17 -04:00
parent a38408419c
commit 16e7f26cec
4 changed files with 8 additions and 8 deletions

View File

@ -1074,7 +1074,7 @@ void Layout::readArgument(Lexer & lex)
arg.tooltip = lex.getDocString();
} else if (tok == "requires") {
lex.next();
arg.requires = lex.getString();
arg.required = lex.getString();
} else if (tok == "decoration") {
lex.next();
arg.decoration = lex.getString();
@ -1150,8 +1150,8 @@ void writeArgument(ostream & os, string const & id, Layout::latexarg const & arg
os << "\t\tPresetArg \"" << to_utf8(arg.presetarg) << "\"\n";
if (!arg.tooltip.empty())
os << "\t\tToolTip \"" << to_utf8(arg.tooltip) << "\"\n";
if (!arg.requires.empty())
os << "\t\tRequires \"" << arg.requires << "\"\n";
if (!arg.required.empty())
os << "\t\tRequires \"" << arg.required << "\"\n";
if (!arg.decoration.empty())
os << "\t\tDecoration \"" << arg.decoration << "\"\n";
if (!arg.newlinecmd.empty())

View File

@ -100,7 +100,7 @@ public:
docstring defaultarg;
docstring presetarg;
docstring tooltip;
std::string requires;
std::string required;
std::string decoration;
FontInfo font;
FontInfo labelfont;

View File

@ -689,7 +689,7 @@ void InsetLayout::readArgument(Lexer & lex)
arg.tooltip = lex.getDocString();
} else if (tok == "requires") {
lex.next();
arg.requires = lex.getString();
arg.required = lex.getString();
} else if (tok == "decoration") {
lex.next();
arg.decoration = lex.getString();

View File

@ -474,8 +474,8 @@ void getArgInsets(otexstream & os, OutputParams const & runparams, Layout::LaTeX
// other arguments, consider this.
for (auto const & larg : latexargs) {
Layout::latexarg const & arg = larg.second;
if ((!arg.presetarg.empty() || !arg.defaultarg.empty()) && !arg.requires.empty()) {
vector<string> req = getVectorFromString(arg.requires);
if ((!arg.presetarg.empty() || !arg.defaultarg.empty()) && !arg.required.empty()) {
vector<string> req = getVectorFromString(arg.required);
required.insert(required.end(), req.begin(), req.end());
}
}
@ -609,7 +609,7 @@ void addArgInsets(Paragraph const & par, string const & prefix,
latexargs.find(arg->name());
if (lit != latexargs.end()) {
Layout::latexarg const & larg = lit->second;
vector<string> req = getVectorFromString(larg.requires);
vector<string> req = getVectorFromString(larg.required);
move(req.begin(), req.end(), back_inserter(required));
}
}