Relatively Quick and Simple Way to Convert from Old Dot Scoping to New Parentheses Scoping?
Does anyone know of a relatively quick and straightforward way of converting code written in the old dot scoping syntax with argumentless do (see here for reference: https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_cdo_legacy) to the modern parentheses scoping syntax? It's not too bad to do it by hand, but it's also easy to make a mistake and leave a "quit" in an if statement by accident for example.
E.g.
do:someCondition
.set value = do ##class(ExampleClass).ExampleFunctionThatReturnsValue() quit:'value
.do ##class(ExampleClass).ExampleOtherFunction()
Should probably become
if someCondition {
set value = do ##class(ExampleClass).ExamplesFunctionThatReturnsValue()
if value {
do ##class(ExampleClass).ExampleOtherFunction()
}
}
where the quit is removed to avoid premature exiting of the larger code block.