-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
On the lowest level the parsing model consists of tokens having different types. For most parts types are fine, but we have identified few issues with them. We should go them through and do at least the following:
-
When assigning variables, we sometimes use the type
VARIABLE
and sometimesASSIGN
. Issue Useassing
, notvariable
, with FOR and TRY/EXCEPT model objects when referring to assigned variables #4708 proposed changing the type used with FOR and EXCEPT AS variables fromVARIABLE
toASSIGN
to be consistent with variables created from keyword return values. This change was already done during the RF 7.0 development, but it was reverted because it turned out we still usedVARIABLE
with variables created in the Variables section and with the new VAR syntax and i wasn't possible to change also these types in RF 7.0. We need to check all places where variables are created and see can we use a common type in all cases and what that type would be. -
We currently use the type
ARGUMENT
with too many different tokens. For example, we use it with IF and WHILE conditions and with variable values in the Variables section and with the VAR syntax. This means that if we wanted to support conditional variable assignment likeVAR ${x} IF $cond y ELSE z
both$cont
andy
would have theARGUMENT
type. This in turn would make it unnecessarily hard to find the condition and value tokens. It's not certain is this kind of conditional variable assignment a good idea in general, but we should nevertheless change the token types so that implementation is possible. We could, for example, introduce a newCONDITION
type to be used with all conditions. -
RETURN
should be changed to mean the RETURN statement, not [Return] setting. -
There are some deprecated and unused token types we can remove. This includes
WITH_NAME
,FORCE_TAGS
,FATAL_ERROR
,FATAL_INVALID_HEADER
andRETURN_SETTING
. -
We should in general go through the token types and see do they make sense. The idea is to do a proper cleanup once and then try to keep the types stable.