This code is not that unclear right now, I just find that it usually works out better to organize visitors such that there is one node-structure per visitor (this is why "transforms" are really just "groups of visitors").

For example, splitting into smaller visitors keeps your .test() logic for each syntax structure from having to be duplicated (once in the test function, once in the visitor to disambiguate all the possible scenarios that would pass the test function).

Also if/when transformations grow bigger, being able to think of the "transform" in terms of smaller parts is really useful when trying to read+understand it (see the es6-class transform for example).

Anyway -- just a general best practice that I like to shoot for. This function is pretty small right now so I guess its ok and we can worry about things in the future if this ever starts growing again.