LEFT | RIGHT |
1 // | 1 // |
2 // Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved. | 2 // Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved. |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 // | 5 // |
6 #ifndef _PARSER_HELPER_INCLUDED_ | 6 #ifndef _PARSER_HELPER_INCLUDED_ |
7 #define _PARSER_HELPER_INCLUDED_ | 7 #define _PARSER_HELPER_INCLUDED_ |
8 | 8 |
9 #include "compiler/Diagnostics.h" | 9 #include "compiler/Diagnostics.h" |
10 #include "compiler/DirectiveHandler.h" | 10 #include "compiler/DirectiveHandler.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 const TPragma& pragma() const { return directiveHandler.pragma(); } | 101 const TPragma& pragma() const { return directiveHandler.pragma(); } |
102 const TExtensionBehavior& extensionBehavior() const { return directiveHandle
r.extensionBehavior(); } | 102 const TExtensionBehavior& extensionBehavior() const { return directiveHandle
r.extensionBehavior(); } |
103 bool supportsExtension(const char* extension); | 103 bool supportsExtension(const char* extension); |
104 | 104 |
105 bool containsSampler(TType& type); | 105 bool containsSampler(TType& type); |
106 bool areAllChildConst(TIntermAggregate* aggrNode); | 106 bool areAllChildConst(TIntermAggregate* aggrNode); |
107 const TFunction* findFunction(const TSourceLoc& line, TFunction* pfnCall, bo
ol *builtIn = 0); | 107 const TFunction* findFunction(const TSourceLoc& line, TFunction* pfnCall, bo
ol *builtIn = 0); |
108 bool isVariableBuiltIn(const TVariable* pVar); | 108 bool isVariableBuiltIn(const TVariable* pVar); |
109 bool executeInitializer(const TSourceLoc& line, TString& identifier, TPublic
Type& pType, | 109 bool executeInitializer(const TSourceLoc& line, TString& identifier, TPublic
Type& pType, |
110 TIntermTyped* initializer, TIntermNode*& intermNode,
TVariable* variable = 0); | 110 TIntermTyped* initializer, TIntermNode*& intermNode,
TVariable* variable = 0); |
111 bool arraySetMaxSize(TIntermSymbol*, TType*, int, bool, const TSourceLoc&); | |
112 | 111 |
113 TIntermTyped* addConstructor(TIntermNode*, const TType*, TOperator, TFunctio
n*, const TSourceLoc&); | 112 TIntermTyped* addConstructor(TIntermNode*, const TType*, TOperator, TFunctio
n*, const TSourceLoc&); |
114 TIntermTyped* foldConstConstructor(TIntermAggregate* aggrNode, const TType&
type); | 113 TIntermTyped* foldConstConstructor(TIntermAggregate* aggrNode, const TType&
type); |
115 TIntermTyped* constructStruct(TIntermNode*, TType*, int, const TSourceLoc&,
bool subset); | 114 TIntermTyped* constructStruct(TIntermNode*, TType*, int, const TSourceLoc&,
bool subset); |
116 TIntermTyped* constructBuiltIn(const TType*, TOperator, TIntermNode*, const
TSourceLoc&, bool subset); | 115 TIntermTyped* constructBuiltIn(const TType*, TOperator, TIntermNode*, const
TSourceLoc&, bool subset); |
117 TIntermTyped* addConstVectorNode(TVectorFields&, TIntermTyped*, const TSourc
eLoc&); | 116 TIntermTyped* addConstVectorNode(TVectorFields&, TIntermTyped*, const TSourc
eLoc&); |
118 TIntermTyped* addConstMatrixNode(int , TIntermTyped*, const TSourceLoc&); | 117 TIntermTyped* addConstMatrixNode(int , TIntermTyped*, const TSourceLoc&); |
119 TIntermTyped* addConstArrayNode(int index, TIntermTyped* node, const TSource
Loc& line); | 118 TIntermTyped* addConstArrayNode(int index, TIntermTyped* node, const TSource
Loc& line); |
120 TIntermTyped* addConstStruct(TString& , TIntermTyped*, const TSourceLoc&); | 119 TIntermTyped* addConstStruct(TString& , TIntermTyped*, const TSourceLoc&); |
121 | 120 |
122 // Performs an error check for embedded struct declarations. | 121 // Performs an error check for embedded struct declarations. |
123 // Returns true if an error was raised due to the declaration of | 122 // Returns true if an error was raised due to the declaration of |
124 // this struct. | 123 // this struct. |
125 bool enterStructDeclaration(const TSourceLoc& line, const TString& identifie
r); | 124 bool enterStructDeclaration(const TSourceLoc& line, const TString& identifie
r); |
126 void exitStructDeclaration(); | 125 void exitStructDeclaration(); |
127 | 126 |
128 bool structNestingErrorCheck(const TSourceLoc& line, const TType& fieldType)
; | 127 bool structNestingErrorCheck(const TSourceLoc& line, const TType& fieldType)
; |
129 }; | 128 }; |
130 | 129 |
131 int PaParseStrings(size_t count, const char* const string[], const int length[], | 130 int PaParseStrings(size_t count, const char* const string[], const int length[], |
132 TParseContext* context); | 131 TParseContext* context); |
133 | 132 |
134 #endif // _PARSER_HELPER_INCLUDED_ | 133 #endif // _PARSER_HELPER_INCLUDED_ |
LEFT | RIGHT |