Add a getNamedVariable helper method to TParseContext.

This method will be useful in more than one place, since we need
to get a TType from an indentifier when parsing invariant
declarations.

BUG=angle:711

Change-Id: I1c1befbdcc93ea626428fb4e313b8c6326c158f6
Reviewed-on: https://chromium-review.googlesource.com/212937
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
diff --git a/src/compiler/translator/ParseContext.h b/src/compiler/translator/ParseContext.h
index a6625d9..3da9420 100644
--- a/src/compiler/translator/ParseContext.h
+++ b/src/compiler/translator/ParseContext.h
@@ -77,6 +77,9 @@
     void trace(const char* str);
     void recover();
 
+    // This method is guaranteed to succeed, even if no variable with 'name' exists.
+    const TVariable *getNamedVariable(const TSourceLoc &location, const TString *name, const TSymbol *symbol);
+
     bool parseVectorFields(const TString&, int vecSize, TVectorFields&, const TSourceLoc& line);
     bool parseMatrixFields(const TString&, int matCols, int matRows, TMatrixFields&, const TSourceLoc& line);