Turkey's President Recep Tayyip Erdogan has pledged to keep fighting in Syria until all his country's goals have been met.