[COMPILER]
* BUG: Like can be used in a Case expression just after the Case keyword only. git-svn-id: svn://localhost/gambas/trunk@4900 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
bbfb58afa4
commit
1b28a5f062
1 changed files with 8 additions and 9 deletions
|
@ -784,7 +784,7 @@ void TRANS_case(void)
|
|||
|
||||
control_enter(RS_CASE);
|
||||
|
||||
like = FALSE;
|
||||
like = TRANS_is(RS_LIKE);
|
||||
|
||||
for(i = 0; ; i++)
|
||||
{
|
||||
|
@ -798,19 +798,18 @@ void TRANS_case(void)
|
|||
TRANS_expression(FALSE);
|
||||
CODE_op(C_EQ, 2);*/
|
||||
|
||||
if (TRANS_is(RS_TO))
|
||||
if (like)
|
||||
{
|
||||
CODE_push_local(local);
|
||||
TRANS_expression(FALSE);
|
||||
CODE_op(C_LIKE, 0, 2, TRUE);
|
||||
}
|
||||
else if (TRANS_is(RS_TO))
|
||||
{
|
||||
CODE_push_local(local);
|
||||
TRANS_expression(FALSE);
|
||||
CODE_op(C_LE, 0, 2, TRUE);
|
||||
}
|
||||
else if (TRANS_is(RS_LIKE) || like)
|
||||
{
|
||||
like = TRUE;
|
||||
CODE_push_local(local);
|
||||
TRANS_expression(FALSE);
|
||||
CODE_op(C_LIKE, 0, 2, TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
TRANS_expression(FALSE);
|
||||
|
|
Loading…
Reference in a new issue