Commit fbcceab3 authored by Victor Yacovlev's avatar Victor Yacovlev

Fixed compiler crash on "(not)not" expression

parent 174e0ee1
......@@ -3354,8 +3354,9 @@ AST::Expression * SyntaxAnalizerPrivate::parseExpression(
else if (blockType==Simple) {
if (block.isEmpty() && notFlag) {
bool isUnaryOperatorAfterNot =
curPos<lexems.length() && (
lexems[curPos]->type==LxOperPlus ||
lexems[curPos]->type==LxOperMinus ;
lexems[curPos]->type==LxOperMinus );
if (curPos==lexems.length()-1 || !isUnaryOperatorAfterNot) {
notFlag->error = _("Extra 'not'");
return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment