[generators] don't generate superfluous semicolons