Terraria's subclasses are very arbitrary, there is nothing in the game which makes any mention of them, and the only 'subclass boosts' are the specific ranger weapon bonuses and the yoyo accessories. I recommend approaching the concept with an idea of your own rules of what is or is not a weapon adhering to a weapon subclass.
But I will still go ahead and list the subclasses that the wiki defines
here.
Under Melee: Swords, Yoyos, Spears, Boomerangs, Flails.
Ranged: Bows, Launchers, Guns and Consumable weapons, the last of that list not expanding to the late game and not being a good idea to pick.
Magic: Wands, Magic Guns, Spellbooks
Summons: Staves, Whips, Sentries
Again, the game has not and likely will not ever make an effort to balance the game around a 'subclass only' run, go ahead with this at your own risk, the game can and might throw you 3 or so bosses without ever getting a new weapon option.