daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 1 | // |
Nicolas Capens | 16004fc | 2014-06-11 11:29:11 -0400 | [diff] [blame] | 2 | // Copyright (c) 2002-2014 The ANGLE Project Authors. All rights reserved. |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 3 | // Use of this source code is governed by a BSD-style license that can be |
| 4 | // found in the LICENSE file. |
| 5 | // |
Geoff Lang | 0a73dd8 | 2014-11-19 16:18:08 -0500 | [diff] [blame] | 6 | #ifndef COMPILER_TRANSLATOR_PARSECONTEXT_H_ |
| 7 | #define COMPILER_TRANSLATOR_PARSECONTEXT_H_ |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 8 | |
Jamie Madill | d4a3a31 | 2014-06-25 16:04:56 -0400 | [diff] [blame] | 9 | #include "compiler/translator/Compiler.h" |
Geoff Lang | 1773282 | 2013-08-29 13:46:49 -0400 | [diff] [blame] | 10 | #include "compiler/translator/Diagnostics.h" |
| 11 | #include "compiler/translator/DirectiveHandler.h" |
Jamie Madill | b1a85f4 | 2014-08-19 15:23:24 -0400 | [diff] [blame] | 12 | #include "compiler/translator/Intermediate.h" |
Geoff Lang | 1773282 | 2013-08-29 13:46:49 -0400 | [diff] [blame] | 13 | #include "compiler/translator/SymbolTable.h" |
Martin Radev | 70866b8 | 2016-07-22 15:27:42 +0300 | [diff] [blame] | 14 | #include "compiler/translator/QualifierTypes.h" |
daniel@transgaming.com | b401a92 | 2012-10-26 18:58:24 +0000 | [diff] [blame] | 15 | #include "compiler/preprocessor/Preprocessor.h" |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 16 | |
Jamie Madill | 45bcc78 | 2016-11-07 13:58:48 -0500 | [diff] [blame] | 17 | namespace sh |
| 18 | { |
| 19 | |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 20 | struct TMatrixFields |
| 21 | { |
daniel@transgaming.com | 0578f81 | 2010-05-17 09:58:39 +0000 | [diff] [blame] | 22 | bool wholeRow; |
| 23 | bool wholeCol; |
| 24 | int row; |
| 25 | int col; |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 26 | }; |
| 27 | |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 28 | // |
| 29 | // The following are extra variables needed during parsing, grouped together so |
| 30 | // they can be passed to the parser without needing a global. |
| 31 | // |
Jamie Madill | 6e06b1f | 2015-05-14 10:01:17 -0400 | [diff] [blame] | 32 | class TParseContext : angle::NonCopyable |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 33 | { |
Jamie Madill | 6e06b1f | 2015-05-14 10:01:17 -0400 | [diff] [blame] | 34 | public: |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 35 | TParseContext(TSymbolTable &symt, |
| 36 | TExtensionBehavior &ext, |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 37 | sh::GLenum type, |
| 38 | ShShaderSpec spec, |
Qiankun Miao | 7ebb97f | 2016-09-08 18:01:50 +0800 | [diff] [blame] | 39 | ShCompileOptions options, |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 40 | bool checksPrecErrors, |
Olli Etuaho | 77ba408 | 2016-12-16 12:01:18 +0000 | [diff] [blame] | 41 | TDiagnostics *diagnostics, |
Jamie Madill | acb4b81 | 2016-11-07 13:50:29 -0500 | [diff] [blame] | 42 | const ShBuiltInResources &resources); |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 43 | |
Jamie Madill | 6e06b1f | 2015-05-14 10:01:17 -0400 | [diff] [blame] | 44 | const pp::Preprocessor &getPreprocessor() const { return mPreprocessor; } |
| 45 | pp::Preprocessor &getPreprocessor() { return mPreprocessor; } |
| 46 | void *getScanner() const { return mScanner; } |
| 47 | void setScanner(void *scanner) { mScanner = scanner; } |
| 48 | int getShaderVersion() const { return mShaderVersion; } |
| 49 | sh::GLenum getShaderType() const { return mShaderType; } |
| 50 | ShShaderSpec getShaderSpec() const { return mShaderSpec; } |
Olli Etuaho | 77ba408 | 2016-12-16 12:01:18 +0000 | [diff] [blame] | 51 | int numErrors() const { return mDiagnostics->numErrors(); } |
Olli Etuaho | 4de340a | 2016-12-16 09:32:03 +0000 | [diff] [blame] | 52 | void error(const TSourceLoc &loc, const char *reason, const char *token); |
| 53 | void warning(const TSourceLoc &loc, const char *reason, const char *token); |
Jamie Madill | 14e95b3 | 2015-05-07 10:10:41 -0400 | [diff] [blame] | 54 | |
Olli Etuaho | 7c3848e | 2015-11-04 13:19:17 +0200 | [diff] [blame] | 55 | // If isError is false, a warning will be reported instead. |
| 56 | void outOfRangeError(bool isError, |
| 57 | const TSourceLoc &loc, |
| 58 | const char *reason, |
Olli Etuaho | 4de340a | 2016-12-16 09:32:03 +0000 | [diff] [blame] | 59 | const char *token); |
Olli Etuaho | 7c3848e | 2015-11-04 13:19:17 +0200 | [diff] [blame] | 60 | |
Olli Etuaho | 6d40bbd | 2016-09-30 13:49:38 +0100 | [diff] [blame] | 61 | TIntermBlock *getTreeRoot() const { return mTreeRoot; } |
| 62 | void setTreeRoot(TIntermBlock *treeRoot) { mTreeRoot = treeRoot; } |
Jamie Madill | 6e06b1f | 2015-05-14 10:01:17 -0400 | [diff] [blame] | 63 | |
Olli Etuaho | a699668 | 2015-10-12 14:32:30 +0300 | [diff] [blame] | 64 | bool getFragmentPrecisionHigh() const |
Jamie Madill | 6e06b1f | 2015-05-14 10:01:17 -0400 | [diff] [blame] | 65 | { |
Olli Etuaho | a699668 | 2015-10-12 14:32:30 +0300 | [diff] [blame] | 66 | return mFragmentPrecisionHighOnESSL1 || mShaderVersion >= 300; |
| 67 | } |
| 68 | void setFragmentPrecisionHighOnESSL1(bool fragmentPrecisionHigh) |
| 69 | { |
| 70 | mFragmentPrecisionHighOnESSL1 = fragmentPrecisionHigh; |
Jamie Madill | 6e06b1f | 2015-05-14 10:01:17 -0400 | [diff] [blame] | 71 | } |
| 72 | |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 73 | void setLoopNestingLevel(int loopNestintLevel) { mLoopNestingLevel = loopNestintLevel; } |
Jamie Madill | 6e06b1f | 2015-05-14 10:01:17 -0400 | [diff] [blame] | 74 | |
Jamie Madill | 6e06b1f | 2015-05-14 10:01:17 -0400 | [diff] [blame] | 75 | void incrLoopNestingLevel() { ++mLoopNestingLevel; } |
| 76 | void decrLoopNestingLevel() { --mLoopNestingLevel; } |
| 77 | |
| 78 | void incrSwitchNestingLevel() { ++mSwitchNestingLevel; } |
| 79 | void decrSwitchNestingLevel() { --mSwitchNestingLevel; } |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 80 | |
Martin Radev | 802abe0 | 2016-08-04 17:48:32 +0300 | [diff] [blame] | 81 | bool isComputeShaderLocalSizeDeclared() const { return mComputeShaderLocalSizeDeclared; } |
Martin Radev | 4c4c8e7 | 2016-08-04 12:25:34 +0300 | [diff] [blame] | 82 | sh::WorkGroupSize getComputeShaderLocalSize() const; |
Martin Radev | 802abe0 | 2016-08-04 17:48:32 +0300 | [diff] [blame] | 83 | |
Olli Etuaho | 09b04a2 | 2016-12-15 13:30:26 +0000 | [diff] [blame] | 84 | int getNumViews() const { return mNumViews; } |
| 85 | |
Martin Radev | 70866b8 | 2016-07-22 15:27:42 +0300 | [diff] [blame] | 86 | void enterFunctionDeclaration() { mDeclaringFunction = true; } |
| 87 | |
| 88 | void exitFunctionDeclaration() { mDeclaringFunction = false; } |
| 89 | |
| 90 | bool declaringFunction() const { return mDeclaringFunction; } |
| 91 | |
Jamie Madill | 5c09702 | 2014-08-20 16:38:32 -0400 | [diff] [blame] | 92 | // This method is guaranteed to succeed, even if no variable with 'name' exists. |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 93 | const TVariable *getNamedVariable(const TSourceLoc &location, |
| 94 | const TString *name, |
| 95 | const TSymbol *symbol); |
Olli Etuaho | 82c29ed | 2015-11-03 13:06:54 +0200 | [diff] [blame] | 96 | TIntermTyped *parseVariableIdentifier(const TSourceLoc &location, |
| 97 | const TString *name, |
| 98 | const TSymbol *symbol); |
Jamie Madill | 5c09702 | 2014-08-20 16:38:32 -0400 | [diff] [blame] | 99 | |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 100 | bool parseVectorFields(const TString &, int vecSize, TVectorFields &, const TSourceLoc &line); |
alokp@chromium.org | 75fe6b7 | 2011-08-14 05:31:22 +0000 | [diff] [blame] | 101 | |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 102 | void assignError(const TSourceLoc &line, const char *op, TString left, TString right); |
| 103 | void unaryOpError(const TSourceLoc &line, const char *op, TString operand); |
| 104 | void binaryOpError(const TSourceLoc &line, const char *op, TString left, TString right); |
Olli Etuaho | 856c497 | 2016-08-08 11:38:39 +0300 | [diff] [blame] | 105 | |
Olli Etuaho | 8a17626 | 2016-08-16 14:23:01 +0300 | [diff] [blame] | 106 | // Check functions - the ones that return bool return false if an error was generated. |
| 107 | |
Olli Etuaho | 856c497 | 2016-08-08 11:38:39 +0300 | [diff] [blame] | 108 | bool checkIsNotReserved(const TSourceLoc &line, const TString &identifier); |
| 109 | void checkPrecisionSpecified(const TSourceLoc &line, TPrecision precision, TBasicType type); |
| 110 | bool checkCanBeLValue(const TSourceLoc &line, const char *op, TIntermTyped *node); |
| 111 | void checkIsConst(TIntermTyped *node); |
| 112 | void checkIsScalarInteger(TIntermTyped *node, const char *token); |
Qiankun Miao | f69682b | 2016-08-16 14:50:42 +0800 | [diff] [blame] | 113 | bool checkIsAtGlobalLevel(const TSourceLoc &line, const char *token); |
Olli Etuaho | 856c497 | 2016-08-08 11:38:39 +0300 | [diff] [blame] | 114 | bool checkConstructorArguments(const TSourceLoc &line, |
Olli Etuaho | af6fc1b | 2017-01-26 17:45:35 -0800 | [diff] [blame] | 115 | const TIntermSequence *arguments, |
Olli Etuaho | 856c497 | 2016-08-08 11:38:39 +0300 | [diff] [blame] | 116 | TOperator op, |
| 117 | const TType &type); |
| 118 | |
| 119 | // Returns a sanitized array size to use (the size is at least 1). |
| 120 | unsigned int checkIsValidArraySize(const TSourceLoc &line, TIntermTyped *expr); |
Olli Etuaho | 8a17626 | 2016-08-16 14:23:01 +0300 | [diff] [blame] | 121 | bool checkIsValidQualifierForArray(const TSourceLoc &line, const TPublicType &elementQualifier); |
| 122 | bool checkIsValidTypeForArray(const TSourceLoc &line, const TPublicType &elementType); |
Olli Etuaho | 856c497 | 2016-08-08 11:38:39 +0300 | [diff] [blame] | 123 | bool checkIsNonVoid(const TSourceLoc &line, const TString &identifier, const TBasicType &type); |
| 124 | void checkIsScalarBool(const TSourceLoc &line, const TIntermTyped *type); |
| 125 | void checkIsScalarBool(const TSourceLoc &line, const TPublicType &pType); |
jchen10 | cc2a10e | 2017-05-03 14:05:12 +0800 | [diff] [blame^] | 126 | bool checkIsNotOpaqueType(const TSourceLoc &line, |
| 127 | const TTypeSpecifierNonArray &pType, |
| 128 | const char *reason); |
Olli Etuaho | 856c497 | 2016-08-08 11:38:39 +0300 | [diff] [blame] | 129 | void checkDeclaratorLocationIsNotSpecified(const TSourceLoc &line, const TPublicType &pType); |
| 130 | void checkLocationIsNotSpecified(const TSourceLoc &location, |
| 131 | const TLayoutQualifier &layoutQualifier); |
Olli Etuaho | 856c497 | 2016-08-08 11:38:39 +0300 | [diff] [blame] | 132 | void checkIsParameterQualifierValid(const TSourceLoc &line, |
Martin Radev | 70866b8 | 2016-07-22 15:27:42 +0300 | [diff] [blame] | 133 | const TTypeQualifierBuilder &typeQualifierBuilder, |
Olli Etuaho | 856c497 | 2016-08-08 11:38:39 +0300 | [diff] [blame] | 134 | TType *type); |
| 135 | bool checkCanUseExtension(const TSourceLoc &line, const TString &extension); |
Olli Etuaho | bb7e5a7 | 2017-04-24 10:16:44 +0300 | [diff] [blame] | 136 | |
| 137 | // Done for all declarations, whether empty or not. |
| 138 | void declarationQualifierErrorCheck(const sh::TQualifier qualifier, |
| 139 | const sh::TLayoutQualifier &layoutQualifier, |
| 140 | const TSourceLoc &location); |
| 141 | // Done for the first non-empty declarator in a declaration. |
| 142 | void nonEmptyDeclarationErrorCheck(const TPublicType &publicType, |
| 143 | const TSourceLoc &identifierLocation); |
| 144 | // Done only for empty declarations. |
Martin Radev | b8b0122 | 2016-11-20 23:25:53 +0200 | [diff] [blame] | 145 | void emptyDeclarationErrorCheck(const TPublicType &publicType, const TSourceLoc &location); |
Olli Etuaho | bb7e5a7 | 2017-04-24 10:16:44 +0300 | [diff] [blame] | 146 | |
Olli Etuaho | 856c497 | 2016-08-08 11:38:39 +0300 | [diff] [blame] | 147 | void checkLayoutQualifierSupported(const TSourceLoc &location, |
| 148 | const TString &layoutQualifierName, |
| 149 | int versionRequired); |
| 150 | bool checkWorkGroupSizeIsNotSpecified(const TSourceLoc &location, |
| 151 | const TLayoutQualifier &layoutQualifier); |
Olli Etuaho | 856c497 | 2016-08-08 11:38:39 +0300 | [diff] [blame] | 152 | void functionCallLValueErrorCheck(const TFunction *fnCandidate, TIntermAggregate *fnCall); |
Martin Radev | 70866b8 | 2016-07-22 15:27:42 +0300 | [diff] [blame] | 153 | void checkInvariantVariableQualifier(bool invariant, |
| 154 | const TQualifier qualifier, |
| 155 | const TSourceLoc &invariantLocation); |
Olli Etuaho | 856c497 | 2016-08-08 11:38:39 +0300 | [diff] [blame] | 156 | void checkInputOutputTypeIsValidES3(const TQualifier qualifier, |
| 157 | const TPublicType &type, |
| 158 | const TSourceLoc &qualifierLocation); |
Martin Radev | 2cc85b3 | 2016-08-05 16:22:53 +0300 | [diff] [blame] | 159 | void checkLocalVariableConstStorageQualifier(const TQualifierWrapperBase &qualifier); |
Jamie Madill | 6e06b1f | 2015-05-14 10:01:17 -0400 | [diff] [blame] | 160 | const TPragma &pragma() const { return mDirectiveHandler.pragma(); } |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 161 | const TExtensionBehavior &extensionBehavior() const |
| 162 | { |
| 163 | return mDirectiveHandler.extensionBehavior(); |
| 164 | } |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 165 | bool supportsExtension(const char *extension); |
| 166 | bool isExtensionEnabled(const char *extension) const; |
| 167 | void handleExtensionDirective(const TSourceLoc &loc, const char *extName, const char *behavior); |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 168 | void handlePragmaDirective(const TSourceLoc &loc, |
| 169 | const char *name, |
| 170 | const char *value, |
| 171 | bool stdgl); |
alokp@chromium.org | 75fe6b7 | 2011-08-14 05:31:22 +0000 | [diff] [blame] | 172 | |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 173 | bool executeInitializer(const TSourceLoc &line, |
| 174 | const TString &identifier, |
| 175 | const TPublicType &pType, |
| 176 | TIntermTyped *initializer, |
Olli Etuaho | 13389b6 | 2016-10-16 11:48:18 +0100 | [diff] [blame] | 177 | TIntermBinary **initNode); |
alokp@chromium.org | 75fe6b7 | 2011-08-14 05:31:22 +0000 | [diff] [blame] | 178 | |
Olli Etuaho | 0e3aee3 | 2016-10-27 12:56:38 +0100 | [diff] [blame] | 179 | void addFullySpecifiedType(TPublicType *typeSpecifier); |
Martin Radev | 70866b8 | 2016-07-22 15:27:42 +0300 | [diff] [blame] | 180 | TPublicType addFullySpecifiedType(const TTypeQualifierBuilder &typeQualifierBuilder, |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 181 | const TPublicType &typeSpecifier); |
Olli Etuaho | e7847b0 | 2015-03-16 11:56:12 +0200 | [diff] [blame] | 182 | |
Olli Etuaho | 13389b6 | 2016-10-16 11:48:18 +0100 | [diff] [blame] | 183 | TIntermDeclaration *parseSingleDeclaration(TPublicType &publicType, |
| 184 | const TSourceLoc &identifierOrTypeLocation, |
| 185 | const TString &identifier); |
| 186 | TIntermDeclaration *parseSingleArrayDeclaration(TPublicType &publicType, |
| 187 | const TSourceLoc &identifierLocation, |
| 188 | const TString &identifier, |
| 189 | const TSourceLoc &indexLocation, |
| 190 | TIntermTyped *indexExpression); |
| 191 | TIntermDeclaration *parseSingleInitDeclaration(const TPublicType &publicType, |
| 192 | const TSourceLoc &identifierLocation, |
| 193 | const TString &identifier, |
| 194 | const TSourceLoc &initLocation, |
| 195 | TIntermTyped *initializer); |
Jamie Madill | 47e3ec0 | 2014-08-20 16:38:33 -0400 | [diff] [blame] | 196 | |
Olli Etuaho | 3875ffd | 2015-04-10 16:45:14 +0300 | [diff] [blame] | 197 | // Parse a declaration like "type a[n] = initializer" |
| 198 | // Note that this does not apply to declarations like "type[n] a = initializer" |
Olli Etuaho | 13389b6 | 2016-10-16 11:48:18 +0100 | [diff] [blame] | 199 | TIntermDeclaration *parseSingleArrayInitDeclaration(TPublicType &publicType, |
| 200 | const TSourceLoc &identifierLocation, |
| 201 | const TString &identifier, |
| 202 | const TSourceLoc &indexLocation, |
| 203 | TIntermTyped *indexExpression, |
| 204 | const TSourceLoc &initLocation, |
| 205 | TIntermTyped *initializer); |
Olli Etuaho | 3875ffd | 2015-04-10 16:45:14 +0300 | [diff] [blame] | 206 | |
Olli Etuaho | bf4e1b7 | 2016-12-09 11:30:15 +0000 | [diff] [blame] | 207 | TIntermInvariantDeclaration *parseInvariantDeclaration( |
| 208 | const TTypeQualifierBuilder &typeQualifierBuilder, |
| 209 | const TSourceLoc &identifierLoc, |
| 210 | const TString *identifier, |
| 211 | const TSymbol *symbol); |
Olli Etuaho | e7847b0 | 2015-03-16 11:56:12 +0200 | [diff] [blame] | 212 | |
Olli Etuaho | 13389b6 | 2016-10-16 11:48:18 +0100 | [diff] [blame] | 213 | void parseDeclarator(TPublicType &publicType, |
| 214 | const TSourceLoc &identifierLocation, |
| 215 | const TString &identifier, |
| 216 | TIntermDeclaration *declarationOut); |
| 217 | void parseArrayDeclarator(TPublicType &publicType, |
| 218 | const TSourceLoc &identifierLocation, |
| 219 | const TString &identifier, |
| 220 | const TSourceLoc &arrayLocation, |
| 221 | TIntermTyped *indexExpression, |
| 222 | TIntermDeclaration *declarationOut); |
| 223 | void parseInitDeclarator(const TPublicType &publicType, |
| 224 | const TSourceLoc &identifierLocation, |
| 225 | const TString &identifier, |
| 226 | const TSourceLoc &initLocation, |
| 227 | TIntermTyped *initializer, |
| 228 | TIntermDeclaration *declarationOut); |
Olli Etuaho | e7847b0 | 2015-03-16 11:56:12 +0200 | [diff] [blame] | 229 | |
Olli Etuaho | 3875ffd | 2015-04-10 16:45:14 +0300 | [diff] [blame] | 230 | // Parse a declarator like "a[n] = initializer" |
Olli Etuaho | 13389b6 | 2016-10-16 11:48:18 +0100 | [diff] [blame] | 231 | void parseArrayInitDeclarator(const TPublicType &publicType, |
| 232 | const TSourceLoc &identifierLocation, |
| 233 | const TString &identifier, |
| 234 | const TSourceLoc &indexLocation, |
| 235 | TIntermTyped *indexExpression, |
| 236 | const TSourceLoc &initLocation, |
| 237 | TIntermTyped *initializer, |
| 238 | TIntermDeclaration *declarationOut); |
Olli Etuaho | 3875ffd | 2015-04-10 16:45:14 +0300 | [diff] [blame] | 239 | |
Martin Radev | 70866b8 | 2016-07-22 15:27:42 +0300 | [diff] [blame] | 240 | void parseGlobalLayoutQualifier(const TTypeQualifierBuilder &typeQualifierBuilder); |
Olli Etuaho | 16c745a | 2017-01-16 17:02:27 +0000 | [diff] [blame] | 241 | TIntermFunctionPrototype *addFunctionPrototypeDeclaration(const TFunction &parsedFunction, |
| 242 | const TSourceLoc &location); |
Olli Etuaho | 8ad9e75 | 2017-01-16 19:55:20 +0000 | [diff] [blame] | 243 | TIntermFunctionDefinition *addFunctionDefinition(TIntermFunctionPrototype *functionPrototype, |
Olli Etuaho | 336b147 | 2016-10-05 16:37:55 +0100 | [diff] [blame] | 244 | TIntermBlock *functionBody, |
| 245 | const TSourceLoc &location); |
Olli Etuaho | 476197f | 2016-10-11 13:59:08 +0100 | [diff] [blame] | 246 | void parseFunctionDefinitionHeader(const TSourceLoc &location, |
| 247 | TFunction **function, |
Olli Etuaho | 8ad9e75 | 2017-01-16 19:55:20 +0000 | [diff] [blame] | 248 | TIntermFunctionPrototype **prototypeOut); |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 249 | TFunction *parseFunctionDeclarator(const TSourceLoc &location, TFunction *function); |
Olli Etuaho | 9de84a5 | 2016-06-14 17:36:01 +0300 | [diff] [blame] | 250 | TFunction *parseFunctionHeader(const TPublicType &type, |
| 251 | const TString *name, |
| 252 | const TSourceLoc &location); |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 253 | TFunction *addConstructorFunc(const TPublicType &publicType); |
Olli Etuaho | 90892fb | 2016-07-14 14:44:51 +0300 | [diff] [blame] | 254 | |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 255 | TIntermTyped *addIndexExpression(TIntermTyped *baseExpression, |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 256 | const TSourceLoc &location, |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 257 | TIntermTyped *indexExpression); |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 258 | TIntermTyped *addFieldSelectionExpression(TIntermTyped *baseExpression, |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 259 | const TSourceLoc &dotLocation, |
| 260 | const TString &fieldString, |
| 261 | const TSourceLoc &fieldLocation); |
shannonwoods@chromium.org | a910088 | 2013-05-30 00:11:39 +0000 | [diff] [blame] | 262 | |
Olli Etuaho | 4de340a | 2016-12-16 09:32:03 +0000 | [diff] [blame] | 263 | TFieldList *combineStructFieldLists(TFieldList *processedFields, |
| 264 | const TFieldList *newlyAddedFields, |
| 265 | const TSourceLoc &location); |
Martin Radev | 70866b8 | 2016-07-22 15:27:42 +0300 | [diff] [blame] | 266 | TFieldList *addStructDeclaratorListWithQualifiers( |
| 267 | const TTypeQualifierBuilder &typeQualifierBuilder, |
| 268 | TPublicType *typeSpecifier, |
| 269 | TFieldList *fieldList); |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 270 | TFieldList *addStructDeclaratorList(const TPublicType &typeSpecifier, TFieldList *fieldList); |
Martin Radev | 4a9cd80 | 2016-09-01 16:51:51 +0300 | [diff] [blame] | 271 | TTypeSpecifierNonArray addStructure(const TSourceLoc &structLine, |
| 272 | const TSourceLoc &nameLine, |
| 273 | const TString *structName, |
| 274 | TFieldList *fieldList); |
kbr@chromium.org | 476541f | 2011-10-27 21:14:51 +0000 | [diff] [blame] | 275 | |
Olli Etuaho | 13389b6 | 2016-10-16 11:48:18 +0100 | [diff] [blame] | 276 | TIntermDeclaration *addInterfaceBlock(const TTypeQualifierBuilder &typeQualifierBuilder, |
| 277 | const TSourceLoc &nameLine, |
| 278 | const TString &blockName, |
| 279 | TFieldList *fieldList, |
| 280 | const TString *instanceName, |
| 281 | const TSourceLoc &instanceLine, |
| 282 | TIntermTyped *arrayIndex, |
| 283 | const TSourceLoc &arrayIndexLine); |
shannonwoods@chromium.org | 5668c5d | 2013-05-30 00:11:48 +0000 | [diff] [blame] | 284 | |
Martin Radev | 802abe0 | 2016-08-04 17:48:32 +0300 | [diff] [blame] | 285 | void parseLocalSize(const TString &qualifierType, |
| 286 | const TSourceLoc &qualifierTypeLine, |
| 287 | int intValue, |
| 288 | const TSourceLoc &intValueLine, |
| 289 | const std::string &intValueString, |
| 290 | size_t index, |
Martin Radev | 4c4c8e7 | 2016-08-04 12:25:34 +0300 | [diff] [blame] | 291 | sh::WorkGroupSize *localSize); |
Olli Etuaho | 09b04a2 | 2016-12-15 13:30:26 +0000 | [diff] [blame] | 292 | void parseNumViews(int intValue, |
| 293 | const TSourceLoc &intValueLine, |
| 294 | const std::string &intValueString, |
| 295 | int *numViews); |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 296 | TLayoutQualifier parseLayoutQualifier(const TString &qualifierType, |
| 297 | const TSourceLoc &qualifierTypeLine); |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 298 | TLayoutQualifier parseLayoutQualifier(const TString &qualifierType, |
| 299 | const TSourceLoc &qualifierTypeLine, |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 300 | int intValue, |
| 301 | const TSourceLoc &intValueLine); |
Olli Etuaho | 613b959 | 2016-09-05 12:05:53 +0300 | [diff] [blame] | 302 | TTypeQualifierBuilder *createTypeQualifierBuilder(const TSourceLoc &loc); |
Martin Radev | 802abe0 | 2016-08-04 17:48:32 +0300 | [diff] [blame] | 303 | TLayoutQualifier joinLayoutQualifiers(TLayoutQualifier leftQualifier, |
| 304 | TLayoutQualifier rightQualifier, |
| 305 | const TSourceLoc &rightQualifierLocation); |
shannonwoods@chromium.org | 302adfe | 2013-05-30 00:21:06 +0000 | [diff] [blame] | 306 | |
kbr@chromium.org | 476541f | 2011-10-27 21:14:51 +0000 | [diff] [blame] | 307 | // Performs an error check for embedded struct declarations. |
Olli Etuaho | 383b791 | 2016-08-05 11:22:59 +0300 | [diff] [blame] | 308 | void enterStructDeclaration(const TSourceLoc &line, const TString &identifier); |
kbr@chromium.org | 476541f | 2011-10-27 21:14:51 +0000 | [diff] [blame] | 309 | void exitStructDeclaration(); |
| 310 | |
Olli Etuaho | 8a17626 | 2016-08-16 14:23:01 +0300 | [diff] [blame] | 311 | void checkIsBelowStructNestingLimit(const TSourceLoc &line, const TField &field); |
Olli Etuaho | 09b2247 | 2015-02-11 11:47:26 +0200 | [diff] [blame] | 312 | |
Olli Etuaho | 6d40bbd | 2016-09-30 13:49:38 +0100 | [diff] [blame] | 313 | TIntermSwitch *addSwitch(TIntermTyped *init, |
| 314 | TIntermBlock *statementList, |
| 315 | const TSourceLoc &loc); |
Olli Etuaho | a3a3666 | 2015-02-17 13:46:51 +0200 | [diff] [blame] | 316 | TIntermCase *addCase(TIntermTyped *condition, const TSourceLoc &loc); |
| 317 | TIntermCase *addDefault(const TSourceLoc &loc); |
| 318 | |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 319 | TIntermTyped *addUnaryMath(TOperator op, TIntermTyped *child, const TSourceLoc &loc); |
| 320 | TIntermTyped *addUnaryMathLValue(TOperator op, TIntermTyped *child, const TSourceLoc &loc); |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 321 | TIntermTyped *addBinaryMath(TOperator op, |
| 322 | TIntermTyped *left, |
| 323 | TIntermTyped *right, |
| 324 | const TSourceLoc &loc); |
| 325 | TIntermTyped *addBinaryMathBooleanResult(TOperator op, |
| 326 | TIntermTyped *left, |
| 327 | TIntermTyped *right, |
| 328 | const TSourceLoc &loc); |
| 329 | TIntermTyped *addAssign(TOperator op, |
| 330 | TIntermTyped *left, |
| 331 | TIntermTyped *right, |
| 332 | const TSourceLoc &loc); |
Olli Etuaho | 4930086 | 2015-02-20 14:54:49 +0200 | [diff] [blame] | 333 | |
Olli Etuaho | 0b2d2dc | 2015-11-04 16:35:32 +0200 | [diff] [blame] | 334 | TIntermTyped *addComma(TIntermTyped *left, TIntermTyped *right, const TSourceLoc &loc); |
| 335 | |
Olli Etuaho | 4930086 | 2015-02-20 14:54:49 +0200 | [diff] [blame] | 336 | TIntermBranch *addBranch(TOperator op, const TSourceLoc &loc); |
| 337 | TIntermBranch *addBranch(TOperator op, TIntermTyped *returnValue, const TSourceLoc &loc); |
Olli Etuaho | c4ba3be | 2015-03-02 14:42:24 +0200 | [diff] [blame] | 338 | |
Olli Etuaho | e1a94c6 | 2015-11-16 17:35:25 +0200 | [diff] [blame] | 339 | void checkTextureOffsetConst(TIntermAggregate *functionCall); |
Martin Radev | 2cc85b3 | 2016-08-05 16:22:53 +0300 | [diff] [blame] | 340 | void checkImageMemoryAccessForBuiltinFunctions(TIntermAggregate *functionCall); |
| 341 | void checkImageMemoryAccessForUserDefinedFunctions(const TFunction *functionDefinition, |
| 342 | const TIntermAggregate *functionCall); |
Olli Etuaho | af6fc1b | 2017-01-26 17:45:35 -0800 | [diff] [blame] | 343 | TIntermSequence *createEmptyArgumentsList(); |
Olli Etuaho | 72d1020 | 2017-01-19 15:58:30 +0000 | [diff] [blame] | 344 | |
Olli Etuaho | af6fc1b | 2017-01-26 17:45:35 -0800 | [diff] [blame] | 345 | // fnCall is only storing the built-in op, and function name or constructor type. arguments |
Olli Etuaho | 72d1020 | 2017-01-19 15:58:30 +0000 | [diff] [blame] | 346 | // has the arguments. |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 347 | TIntermTyped *addFunctionCallOrMethod(TFunction *fnCall, |
Olli Etuaho | af6fc1b | 2017-01-26 17:45:35 -0800 | [diff] [blame] | 348 | TIntermSequence *arguments, |
Jamie Madill | 0614523 | 2015-05-13 13:10:01 -0400 | [diff] [blame] | 349 | TIntermNode *thisNode, |
Olli Etuaho | 72d1020 | 2017-01-19 15:58:30 +0000 | [diff] [blame] | 350 | const TSourceLoc &loc); |
Olli Etuaho | fc1806e | 2015-03-17 13:03:11 +0200 | [diff] [blame] | 351 | |
Olli Etuaho | d0bad2c | 2016-09-09 18:01:16 +0300 | [diff] [blame] | 352 | TIntermTyped *addTernarySelection(TIntermTyped *cond, |
| 353 | TIntermTyped *trueExpression, |
| 354 | TIntermTyped *falseExpression, |
| 355 | const TSourceLoc &line); |
Olli Etuaho | 5290174 | 2015-04-15 13:42:45 +0300 | [diff] [blame] | 356 | |
Jamie Madill | 6e06b1f | 2015-05-14 10:01:17 -0400 | [diff] [blame] | 357 | // TODO(jmadill): make these private |
Olli Etuaho | f119a26 | 2016-08-19 15:54:22 +0300 | [diff] [blame] | 358 | TIntermediate intermediate; // to build a parse tree |
Jamie Madill | 6e06b1f | 2015-05-14 10:01:17 -0400 | [diff] [blame] | 359 | TSymbolTable &symbolTable; // symbol table that goes with the language currently being parsed |
| 360 | |
Olli Etuaho | fc1806e | 2015-03-17 13:03:11 +0200 | [diff] [blame] | 361 | private: |
Olli Etuaho | 4de340a | 2016-12-16 09:32:03 +0000 | [diff] [blame] | 362 | // Returns a clamped index. If it prints out an error message, the token is "[]". |
Olli Etuaho | 90892fb | 2016-07-14 14:44:51 +0300 | [diff] [blame] | 363 | int checkIndexOutOfRange(bool outOfRangeIndexIsError, |
| 364 | const TSourceLoc &location, |
| 365 | int index, |
| 366 | int arraySize, |
Olli Etuaho | 4de340a | 2016-12-16 09:32:03 +0000 | [diff] [blame] | 367 | const char *reason); |
Olli Etuaho | 90892fb | 2016-07-14 14:44:51 +0300 | [diff] [blame] | 368 | |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 369 | bool declareVariable(const TSourceLoc &line, |
| 370 | const TString &identifier, |
| 371 | const TType &type, |
| 372 | TVariable **variable); |
Olli Etuaho | 2935c58 | 2015-04-08 14:32:06 +0300 | [diff] [blame] | 373 | |
Olli Etuaho | 856c497 | 2016-08-08 11:38:39 +0300 | [diff] [blame] | 374 | void checkCanBeDeclaredWithoutInitializer(const TSourceLoc &line, |
| 375 | const TString &identifier, |
| 376 | TPublicType *type); |
Olli Etuaho | 376f1b5 | 2015-04-13 13:23:41 +0300 | [diff] [blame] | 377 | |
Olli Etuaho | 8a17626 | 2016-08-16 14:23:01 +0300 | [diff] [blame] | 378 | bool checkIsValidTypeAndQualifierForArray(const TSourceLoc &indexLocation, |
| 379 | const TPublicType &elementType); |
| 380 | |
Olli Etuaho | 1dded80 | 2016-08-18 18:13:13 +0300 | [diff] [blame] | 381 | // Assumes that multiplication op has already been set based on the types. |
| 382 | bool isMultiplicationTypeCombinationValid(TOperator op, const TType &left, const TType &right); |
| 383 | |
Martin Radev | 2cc85b3 | 2016-08-05 16:22:53 +0300 | [diff] [blame] | 384 | void checkOutParameterIsNotOpaqueType(const TSourceLoc &line, |
| 385 | TQualifier qualifier, |
| 386 | const TType &type); |
Martin Radev | 2cc85b3 | 2016-08-05 16:22:53 +0300 | [diff] [blame] | 387 | |
Olli Etuaho | 4336489 | 2017-02-13 16:00:12 +0000 | [diff] [blame] | 388 | void checkInternalFormatIsNotSpecified(const TSourceLoc &location, |
| 389 | TLayoutImageInternalFormat internalFormat); |
| 390 | void checkMemoryQualifierIsNotSpecified(const TMemoryQualifier &memoryQualifier, |
| 391 | const TSourceLoc &location); |
| 392 | void checkBindingIsValid(const TSourceLoc &identifierLocation, const TType &type); |
| 393 | void checkBindingIsNotSpecified(const TSourceLoc &location, int binding); |
| 394 | void checkImageBindingIsValid(const TSourceLoc &location, int binding, int arraySize); |
| 395 | void checkSamplerBindingIsValid(const TSourceLoc &location, int binding, int arraySize); |
| 396 | |
Olli Etuaho | 6ca2b65 | 2017-02-19 18:05:10 +0000 | [diff] [blame] | 397 | void checkUniformLocationInRange(const TSourceLoc &location, |
| 398 | int objectLocationCount, |
| 399 | const TLayoutQualifier &layoutQualifier); |
| 400 | |
Andrei Volykhin | a552707 | 2017-03-22 16:46:30 +0300 | [diff] [blame] | 401 | void checkYuvIsNotSpecified(const TSourceLoc &location, bool yuv); |
| 402 | |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 403 | TIntermTyped *addBinaryMathInternal(TOperator op, |
| 404 | TIntermTyped *left, |
| 405 | TIntermTyped *right, |
| 406 | const TSourceLoc &loc); |
Olli Etuaho | 13389b6 | 2016-10-16 11:48:18 +0100 | [diff] [blame] | 407 | TIntermBinary *createAssign(TOperator op, |
| 408 | TIntermTyped *left, |
| 409 | TIntermTyped *right, |
| 410 | const TSourceLoc &loc); |
Olli Etuaho | af6fc1b | 2017-01-26 17:45:35 -0800 | [diff] [blame] | 411 | TIntermTyped *createUnaryMath(TOperator op, TIntermTyped *child, const TSourceLoc &loc); |
| 412 | |
| 413 | TIntermTyped *addMethod(TFunction *fnCall, |
| 414 | TIntermSequence *arguments, |
| 415 | TIntermNode *thisNode, |
| 416 | const TSourceLoc &loc); |
| 417 | TIntermTyped *addConstructor(TIntermSequence *arguments, |
| 418 | TOperator op, |
| 419 | TType type, |
| 420 | const TSourceLoc &line); |
| 421 | TIntermTyped *addNonConstructorFunctionCall(TFunction *fnCall, |
| 422 | TIntermSequence *arguments, |
| 423 | const TSourceLoc &loc); |
Olli Etuaho | d6b1428 | 2015-03-17 14:31:35 +0200 | [diff] [blame] | 424 | |
Olli Etuaho | 47fd36a | 2015-03-19 14:22:24 +0200 | [diff] [blame] | 425 | // Return true if the checks pass |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 426 | bool binaryOpCommonCheck(TOperator op, |
| 427 | TIntermTyped *left, |
| 428 | TIntermTyped *right, |
| 429 | const TSourceLoc &loc); |
Olli Etuaho | fa33d58 | 2015-04-09 14:33:12 +0300 | [diff] [blame] | 430 | |
Olli Etuaho | 8ad9e75 | 2017-01-16 19:55:20 +0000 | [diff] [blame] | 431 | TIntermFunctionPrototype *createPrototypeNodeFromFunction(const TFunction &function, |
| 432 | const TSourceLoc &location, |
| 433 | bool insertParametersToSymbolTable); |
| 434 | |
Olli Etuaho | bb7e5a7 | 2017-04-24 10:16:44 +0300 | [diff] [blame] | 435 | // Set to true when the last/current declarator list was started with an empty declaration. The |
| 436 | // non-empty declaration error check will need to be performed if the empty declaration is |
| 437 | // followed by a declarator. |
| 438 | bool mDeferredNonEmptyDeclarationErrorCheck; |
Jamie Madill | 6e06b1f | 2015-05-14 10:01:17 -0400 | [diff] [blame] | 439 | |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 440 | sh::GLenum mShaderType; // vertex or fragment language (future: pack or unpack) |
Qiankun Miao | 7ebb97f | 2016-09-08 18:01:50 +0800 | [diff] [blame] | 441 | ShShaderSpec mShaderSpec; // The language specification compiler conforms to - GLES2 or WebGL. |
| 442 | ShCompileOptions mCompileOptions; // Options passed to TCompiler |
Jamie Madill | 6e06b1f | 2015-05-14 10:01:17 -0400 | [diff] [blame] | 443 | int mShaderVersion; |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 444 | TIntermBlock *mTreeRoot; // root of parse tree being created |
| 445 | int mLoopNestingLevel; // 0 if outside all loops |
| 446 | int mStructNestingLevel; // incremented while parsing a struct declaration |
| 447 | int mSwitchNestingLevel; // 0 if outside all switch statements |
Qiankun Miao | 7ebb97f | 2016-09-08 18:01:50 +0800 | [diff] [blame] | 448 | const TType |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 449 | *mCurrentFunctionType; // the return type of the function that's currently being parsed |
| 450 | bool mFunctionReturnsValue; // true if a non-void function has a return |
Qiankun Miao | 7ebb97f | 2016-09-08 18:01:50 +0800 | [diff] [blame] | 451 | bool mChecksPrecisionErrors; // true if an error will be generated when a variable is declared |
| 452 | // without precision, explicit or implicit. |
Olli Etuaho | a699668 | 2015-10-12 14:32:30 +0300 | [diff] [blame] | 453 | bool mFragmentPrecisionHighOnESSL1; // true if highp precision is supported when compiling |
| 454 | // ESSL1. |
Jamie Madill | 6e06b1f | 2015-05-14 10:01:17 -0400 | [diff] [blame] | 455 | TLayoutMatrixPacking mDefaultMatrixPacking; |
| 456 | TLayoutBlockStorage mDefaultBlockStorage; |
| 457 | TString mHashErrMsg; |
Olli Etuaho | 77ba408 | 2016-12-16 12:01:18 +0000 | [diff] [blame] | 458 | TDiagnostics *mDiagnostics; |
Jamie Madill | 6e06b1f | 2015-05-14 10:01:17 -0400 | [diff] [blame] | 459 | TDirectiveHandler mDirectiveHandler; |
| 460 | pp::Preprocessor mPreprocessor; |
| 461 | void *mScanner; |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 462 | bool mUsesFragData; // track if we are using both gl_FragData and gl_FragColor |
Jamie Madill | 14e95b3 | 2015-05-07 10:10:41 -0400 | [diff] [blame] | 463 | bool mUsesFragColor; |
Kimmo Kinnunen | b18609b | 2015-07-16 14:13:11 +0300 | [diff] [blame] | 464 | bool mUsesSecondaryOutputs; // Track if we are using either gl_SecondaryFragData or |
| 465 | // gl_Secondary FragColor or both. |
Olli Etuaho | e1a94c6 | 2015-11-16 17:35:25 +0200 | [diff] [blame] | 466 | int mMinProgramTexelOffset; |
| 467 | int mMaxProgramTexelOffset; |
Martin Radev | 802abe0 | 2016-08-04 17:48:32 +0300 | [diff] [blame] | 468 | |
Olli Etuaho | 09b04a2 | 2016-12-15 13:30:26 +0000 | [diff] [blame] | 469 | bool mMultiviewAvailable; |
| 470 | |
Martin Radev | 802abe0 | 2016-08-04 17:48:32 +0300 | [diff] [blame] | 471 | // keep track of local group size declared in layout. It should be declared only once. |
| 472 | bool mComputeShaderLocalSizeDeclared; |
Martin Radev | 4c4c8e7 | 2016-08-04 12:25:34 +0300 | [diff] [blame] | 473 | sh::WorkGroupSize mComputeShaderLocalSize; |
Olli Etuaho | 09b04a2 | 2016-12-15 13:30:26 +0000 | [diff] [blame] | 474 | // keep track of number of views declared in layout. |
| 475 | int mNumViews; |
| 476 | int mMaxNumViews; |
Olli Etuaho | 4336489 | 2017-02-13 16:00:12 +0000 | [diff] [blame] | 477 | int mMaxImageUnits; |
| 478 | int mMaxCombinedTextureImageUnits; |
Olli Etuaho | 6ca2b65 | 2017-02-19 18:05:10 +0000 | [diff] [blame] | 479 | int mMaxUniformLocations; |
Martin Radev | 70866b8 | 2016-07-22 15:27:42 +0300 | [diff] [blame] | 480 | // keeps track whether we are declaring / defining a function |
| 481 | bool mDeclaringFunction; |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 482 | }; |
| 483 | |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 484 | int PaParseStrings(size_t count, |
| 485 | const char *const string[], |
| 486 | const int length[], |
| 487 | TParseContext *context); |
daniel@transgaming.com | 4f39fd9 | 2010-03-08 20:26:45 +0000 | [diff] [blame] | 488 | |
Jamie Madill | 45bcc78 | 2016-11-07 13:58:48 -0500 | [diff] [blame] | 489 | } // namespace sh |
| 490 | |
Jamie Madill | d7b1ab5 | 2016-12-12 14:42:19 -0500 | [diff] [blame] | 491 | #endif // COMPILER_TRANSLATOR_PARSECONTEXT_H_ |