Remove parser switching duplication
Add line numbers to warnings