Validate empty statements in switch statements

Even an empty statement like ";" is a statement according to the
grammar. They should not be allowed in switch statements before the
first case statement, but on the other hand a switch statement that
has just an empty statement after the last statement is valid.

Now the parser creates AST nodes from empty statements so that we can
validate switch statements correctly. However, they are pruned shortly
after parsing completes in PruneNoOps, so they don't affect further
processing of the AST.

BUG=angleproject:2181
TEST=angle_unittests

Change-Id: I1085056fc34b146142546fc5f2b7f3124b910ab9
Reviewed-on: https://chromium-review.googlesource.com/743621
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/ParseContext.h b/src/compiler/translator/ParseContext.h
index 1f7f5b9..12924d1 100644
--- a/src/compiler/translator/ParseContext.h
+++ b/src/compiler/translator/ParseContext.h
@@ -262,6 +262,8 @@
                                   TIntermTyped *initializer,
                                   TIntermDeclaration *declarationOut);
 
+    TIntermNode *addEmptyStatement(const TSourceLoc &location);
+
     void parseDefaultPrecisionQualifier(const TPrecision precision,
                                         const TPublicType &type,
                                         const TSourceLoc &loc);