Repository navigation
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
VARIABLEand 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 fromVARIABLEtoASSIGNto 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 usedVARIABLEwith 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
ARGUMENTwith 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 zboth$contandywould have theARGUMENTtype. 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 newCONDITIONtype to be used with all conditions. -
RETURNshould 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_HEADERandRETURN_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.
Activity