Parsing model: Rename Return
to ReturnSetting
and ReturnStatement
to Return
#4939
Milestone
Return
to ReturnSetting
and ReturnStatement
to Return
#4939
The deprecated
[Return]
setting is currently represented in the parsing model using aReturn
class and theRETURN
statement is represented asReturnStatement
. For consistency with other control structures, it's better to change this so thatReturn
representsRETURN
and[Return]
is represented byReturnSetting
. We already addedReturnSetting
as a forwards compatible alias forReturn
in RF 6.1 (#4656) exactly for this purpose. TheModelVisitor
base class also supportvisit_ReturnSetting
already now.In practice this is what needs to be done:
Return
toReturnSetting
and remove the currentReturnSetting
alias.ReturnStatement
toReturn
.ReturnStatement
alias for backwards compatibility.visit_ReturnStatement
to theModelVisitor
. It will be called withReturn
nodes ifvisit_Return
is missing.This is a backwards incompatible change and tools working with the parsing model need to be updated. When using
ModelVisitor
, the following code ought to work with all versions. If only RF 6.1 or newer needs to be supported,visit_Return
isn't needed because Robot will automatically call appropriatevisit_ReturnXxx
method.The text was updated successfully, but these errors were encountered: