@Alexey Maslov  - check out https://openexchange.intersystems.com/package/isc-codetidy .... this package includes automatic expansion of ObjectScript commands.  Even if you don't want to use the whole package, you can find the sample code to do expansion.

@Evan Gabhart  - can you please advise as to the specific class where the expansion code can be found?