Move comma operator parsing to ParseContext

This change is pure refactoring. It will help with fixing comma operator
return value qualifier bug.

BUG=angleproject:911
BUG=angleproject:1201

Change-Id: I481c337adbaf789cc959c8a1106f99ad7275e1e5
Reviewed-on: https://chromium-review.googlesource.com/311170
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
diff --git a/src/compiler/translator/ParseContext.cpp b/src/compiler/translator/ParseContext.cpp
index 03a4fd3..8e145c6 100644
--- a/src/compiler/translator/ParseContext.cpp
+++ b/src/compiler/translator/ParseContext.cpp
@@ -3746,6 +3746,20 @@
     return node;
 }
 
+TIntermTyped *TParseContext::addComma(TIntermTyped *left,
+                                      TIntermTyped *right,
+                                      const TSourceLoc &loc)
+{
+    TIntermTyped *node = intermediate.addComma(left, right, loc);
+    if (node == nullptr)
+    {
+        binaryOpError(loc, ",", left->getCompleteString(), right->getCompleteString());
+        recover();
+        return right;
+    }
+    return node;
+}
+
 TIntermBranch *TParseContext::addBranch(TOperator op, const TSourceLoc &loc)
 {
     switch (op)