X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_parser.C;h=0c8b5e79c4c76e0e667656506d6a407afe744ec7;hb=2da8fcabdc695b8bb139d7252b923ef6b9aa29dd;hp=bb7ef9c5be80f2d182cc4ebf9a2e8a2b5ff206dd;hpb=6c12ac0526e100da351301210f9de58f049b1487;p=lyx.git diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index bb7ef9c5be..0c8b5e79c4 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -556,9 +556,6 @@ latexkeys const * Parser::read_delim() void Parser::parse_into(MathArray & array, unsigned flags) { - static int plevel = -1; - - ++plevel; MathTextCodes yyvarcode = LM_TC_VAR; int t = yylex(); @@ -602,7 +599,7 @@ void Parser::parse_into(MathArray & array, unsigned flags) case LM_TK_ARGUMENT: { MathMacroArgument * p = new MathMacroArgument(ival_); - p->code(yyvarcode); + //p->code(yyvarcode); array.push_back(p); break; } @@ -670,7 +667,6 @@ void Parser::parse_into(MathArray & array, unsigned flags) case '&': if (flags & FLAG_AMPERSAND) { flags &= ~FLAG_AMPERSAND; - --plevel; return; } lyxerr[Debug::MATHED] @@ -682,7 +678,6 @@ void Parser::parse_into(MathArray & array, unsigned flags) curr_skip_ = lexArg('['); if (flags & FLAG_NEWLINE) { flags &= ~FLAG_NEWLINE; - --plevel; return; } lyxerr[Debug::MATHED] @@ -773,10 +768,8 @@ void Parser::parse_into(MathArray & array, unsigned flags) } case LM_TK_RIGHT: - if (flags & FLAG_RIGHT) { - --plevel; + if (flags & FLAG_RIGHT) return; - } error("Unmatched right delimiter"); // panic = true; break; @@ -825,7 +818,6 @@ void Parser::parse_into(MathArray & array, unsigned flags) case LM_TK_MATH: case LM_TK_END: - --plevel; return; case LM_TK_BEGIN: @@ -881,7 +873,6 @@ void Parser::parse_into(MathArray & array, unsigned flags) t = yylex(); } } - --plevel; }