Adding unsized arrays to the glsl parser

Unsized arrays declare with an empty [] without
a specified size are now supported properly in
the glsl parser.

Also moved the construction code from the parser
into TParseContext.

Change-Id: Ic7b3efeee51da1a264e26af4d7908e7d2fccebd9
Reviewed-on: https://swiftshader-review.googlesource.com/3520
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/compiler/Intermediate.cpp b/src/OpenGL/compiler/Intermediate.cpp
index 40be9be..0579deb 100644
--- a/src/OpenGL/compiler/Intermediate.cpp
+++ b/src/OpenGL/compiler/Intermediate.cpp
@@ -780,11 +780,7 @@
 //
 bool TIntermBinary::promote(TInfoSink& infoSink)
 {
-    // This function only handles scalars, vectors, and matrices.
-    if (left->isArray() || right->isArray()) {
-        infoSink.info.message(EPrefixInternalError, "Invalid operation for arrays", getLine());
-        return false;
-    }
+	ASSERT(left->isArray() == right->isArray());
 
     // GLSL ES 2.0 does not support implicit type casting.
     // So the basic type should always match.