refactor visitor code for specifier statements