'+Inf' and '-Inf' really do not prevent the next pattern to be a reserved keyword anymore.

[COMPILER]
* BUG: '+Inf' and '-Inf' really do not prevent the next pattern to be a reserved keyword anymore.
This commit is contained in:
Benoît Minisini 2023-04-27 14:55:02 +02:00
parent a3319fefd1
commit a309559bdb

View file

@ -398,7 +398,7 @@ static void add_identifier()
{
can_be_reserved = (index >= RS_COLON || index == RS_NEW || index == RS_OPEN || index == RS_CLOSE || index == RS_SHELL || index == RS_EXEC || index == RS_RAISE || index == RS_PIPE || index == RS_LOCK || index == RS_MEMORY || index == RS_READ || index == RS_PEEK);
}
else if (!_begin_line && !last_type && index < RS_P_IF && PATTERN_is_reserved(last_pattern) && !RES_is_identifier(PATTERN_index(last_pattern)) && !PATTERN_is(last_pattern, RS_RBRA) && !PATTERN_is(last_pattern, RS_RSQR))
else if (!_begin_line && !last_type && index < RS_P_IF && PATTERN_is_reserved(last_pattern) && !RES_is_identifier(PATTERN_index(last_pattern)) && !PATTERN_is(last_pattern, RS_PINF) && !PATTERN_is(last_pattern, RS_MINF) && !PATTERN_is(last_pattern, RS_RBRA) && !PATTERN_is(last_pattern, RS_RSQR))
can_be_reserved = FALSE;
break;
}