to issue<51947103>:fix 4016 when using '==' condition operator and pl cache match issue

This commit is contained in:
hanr881
2023-09-01 07:14:36 +00:00
committed by ob-robot
parent 6d8fedae8b
commit 5eed1011a1
2 changed files with 12 additions and 2 deletions

View File

@ -1395,6 +1395,15 @@ BEGIN(in_c_comment);
"&&" {return AND_OP;}
"=" {return COMP_EQ;}
"==" {
ParseResult *p = (ParseResult *)yyextra;
if (!p->pl_parse_info_.is_pl_parse_) {
yyerror(yylloc, yyextra, "== operator not in pl context\n");
return PARSER_SYNTAX_ERROR;
} else {
return COMP_EQ;
}
}
":=" {return SET_VAR;}
"<=>" {return COMP_NSEQ;}
">=" {return COMP_GE;}