Skip to content

Commit

Permalink
fix parsing of && and ||
Browse files Browse the repository at this point in the history
  • Loading branch information
IS4Code committed Nov 2, 2024
1 parent d43d1c0 commit 0b1673a
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions plugins/src/modules/parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,6 @@ class expression_parser
}
case '(':
{
auto old = begin;
++begin;
auto inner = parse_outer_expression(amx, begin, end, ')');
++begin;
Expand Down Expand Up @@ -1116,7 +1115,13 @@ class expression_parser
{
break;
}
auto old = begin;
++begin;
if(begin != end && *begin == '&')
{
begin = old;
return result;
}
auto inner = parse_operand(amx, begin, end, endchar);
if(!inner)
{
Expand All @@ -1131,7 +1136,13 @@ class expression_parser
{
break;
}
auto old = begin;
++begin;
if(begin != end && *begin == '|')
{
begin = old;
return result;
}
auto inner = parse_operand(amx, begin, end, endchar);
if(!inner)
{
Expand Down Expand Up @@ -1196,7 +1207,6 @@ class expression_parser
{
break;
}
auto old = begin;
++begin;
if(begin == end || *begin != '&')
{
Expand All @@ -1213,7 +1223,6 @@ class expression_parser
{
break;
}
auto old = begin;
++begin;
if(begin == end || *begin != '|')
{
Expand Down

0 comments on commit 0b1673a

Please sign in to comment.