}
-void MathCursor::interpret(string const & s)
+void MathCursor::interpret(string const & t)
{
//lyxerr << "interpret: '" << s << "'\n";
//lyxerr << "in: " << in_word_set(s) << " \n";
- if (s.empty())
+ if (t.empty())
return;
+ // temporary glue code
+ string s = t;
+ if (s[0] == '\\')
+ s = s.substr(1);
+
if (s[0] == '^' || s[0] == '_') {
bool const up = (s[0] == '^');
selCut();
int t = yylex();
bool panic = false;
- int brace = 0;
int limits = 0;
while (t) {
if (flags & FLAG_ITEM) {
flags &= ~FLAG_ITEM;
if (t == LM_TK_OPEN) {
- // skip the brace and regard everything to the next matching
+ // skip the brace and collect everything to the next matching
// closing brace
t = yylex();
- ++brace;
flags |= FLAG_BRACE_LAST;
} else {
- // regard only this single token
+ // take only this single token
flags |= FLAG_LEAVE;
}
}
if ((flags & FLAG_BRACE) && t != LM_TK_OPEN) {
- error(
- "Expected {. Maybe you forgot to enclose an argument in {}");
+ error("Expected {. Maybe you forgot to enclose an argument in {}");
panic = true;
break;
}