fn push(parts: &mut Vec<Part>, part: Part)
Adds a line to the last part when it is of the same kind, else starts a new part.