Opinions have varied over the years. Current views have changed again with tomatoes being a vegetable that has fruit like qualities and is therefore hard to distinguish from being a fruit. Luckily for all of us I do not believe it is currently classified as a legume.
So the best answer is "yes." Not everything is either/or. The tomato transcends your categories.
Thanks! Your answer is awaiting moderation.