#include "debug.h"
#include "gettext.h"
-#include "lyxlex.h"
+#include "Lexer.h"
#include "support/ExceptionMessage.h"
#include "support/lstrings.h"
// InsetCitation
// FIXME: Use is_possible_cite_command() in
- // src/frontends/controllers/frontend_helpers.cpp, see comment in src/factory.C.
+ // src/frontends/controllers/frontend_helpers.cpp, see comment in src/factory.cpp.
if (name == "cite" || name == "citet" || name == "citep" || name == "citealt" ||
name == "citealp" || name == "citeauthor" || name == "citeyear" ||
name == "citeyearpar" || name == "citet*" || name == "citep*" ||
return &info;
}
+ if (name == "lstinputlisting") {
+ static const char * const paramnames[] = {"filename", "lstparams", ""};
+ static const bool isoptional[] = {false, true};
+ static const CommandInfo info = {2, paramnames, isoptional};
+ return &info;
+ }
+
// InsetIndex, InsetPrintIndex, InsetLabel
if (name == "index" || name == "printindex" || name == "label") {
static const char * const paramnames[] = {"name", ""};
}
-void InsetCommandParams::read(LyXLex & lex)
+void InsetCommandParams::read(Lexer & lex)
{
if (lex.isOK()) {
lex.next();
if (!params_[i].empty())
// FIXME UNICODE
os << info_->paramnames[i] << ' '
- << LyXLex::quoteString(to_utf8(params_[i]))
+ << Lexer::quoteString(to_utf8(params_[i]))
<< '\n';
}
if (info_->optional[i])
return to_utf8(params_[i]);
lyxerr << "Programming error: get nonexisting option in "
- << name_ << " inset." << endl;;
+ << name_ << " inset." << endl;;
return string();
}
}
// Happens in InsetCitation
lyxerr << "Programming error: get nonexisting second option in "
- << name_ << " inset." << endl;;
+ << name_ << " inset." << endl;;
return string();
}
return;
}
lyxerr << "Programming error: set nonexisting option in "
- << name_ << " inset." << endl;;
+ << name_ << " inset." << endl;;
}
}
// Happens in InsetCitation
lyxerr << "Programming error: set nonexisting second option in "
- << name_ << " inset." << endl;;
+ << name_ << " inset." << endl;;
}