Draft: Rework of the parsing structure for warnings
With the upcoming instance and export deprecation there is an increasing need for separating out of a custom warnings subsystem. This MR separates out the warning pragmas scattered around the parser into a common set of rules.