#include "debug.h"
#include "gettext.h"
-#include "LyXLex.h"
+#include "Lexer.h"
#include "support/ExceptionMessage.h"
#include "support/lstrings.h"
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;;
}