Three-dimensional printing of continuous-fiber composites by in-nozzle impregnation