Clean up GLSL switch statement validation

Encapsulate all of the implementation inside the .cpp file, and pass
just the diagnostics object instead of the whole ParseContext to the
validation function.

BUG=angleproject:1670
TEST=angle_unittests

Change-Id: I89713b63e554dbedaa12b2270208f1fac496c54e
Reviewed-on: https://chromium-review.googlesource.com/420788
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/Diagnostics.cpp b/src/compiler/translator/Diagnostics.cpp
index a97aa37..b365dd0 100644
--- a/src/compiler/translator/Diagnostics.cpp
+++ b/src/compiler/translator/Diagnostics.cpp
@@ -63,6 +63,11 @@
     writeInfo(pp::Diagnostics::PP_ERROR, srcLoc, reason, token, extraInfo);
 }
 
+void TDiagnostics::error(const TSourceLoc &loc, const char *reason, const char *token)
+{
+    error(loc, reason, token, "");
+}
+
 void TDiagnostics::warning(const TSourceLoc &loc,
                            const char *reason,
                            const char *token,