diff options
Diffstat (limited to '3rdparty/bgfx/3rdparty/glslang/hlsl/hlslGrammar.h')
-rw-r--r-- | 3rdparty/bgfx/3rdparty/glslang/hlsl/hlslGrammar.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslGrammar.h b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslGrammar.h index 29e4b1763f8..1a3abf10997 100644 --- a/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslGrammar.h +++ b/3rdparty/bgfx/3rdparty/glslang/hlsl/hlslGrammar.h @@ -43,7 +43,8 @@ namespace glslang { - class TAttributeMap; // forward declare + class TAttributeMap; + class TFunctionDeclarator; // Should just be the grammar aspect of HLSL. // Described in more detail in hlslGrammar.cpp. @@ -64,27 +65,36 @@ namespace glslang { void unimplemented(const char*); bool acceptIdentifier(HlslToken&); bool acceptCompilationUnit(); - bool acceptDeclaration(TIntermNode*& node); + bool acceptDeclaration(TIntermNode*&); bool acceptControlDeclaration(TIntermNode*& node); bool acceptSamplerDeclarationDX9(TType&); bool acceptSamplerState(); bool acceptFullySpecifiedType(TType&); + bool acceptFullySpecifiedType(TType&, TIntermNode*& nodeList); bool acceptQualifier(TQualifier&); bool acceptLayoutQualifierList(TQualifier&); bool acceptType(TType&); + bool acceptType(TType&, TIntermNode*& nodeList); bool acceptTemplateVecMatBasicType(TBasicType&); bool acceptVectorTemplateType(TType&); bool acceptMatrixTemplateType(TType&); + bool acceptTessellationDeclType(); + bool acceptTessellationPatchTemplateType(TType&); bool acceptStreamOutTemplateType(TType&, TLayoutGeometry&); bool acceptOutputPrimitiveGeometry(TLayoutGeometry&); bool acceptAnnotations(TQualifier&); bool acceptSamplerType(TType&); bool acceptTextureType(TType&); - bool acceptStruct(TType&); - bool acceptStructDeclarationList(TTypeList*&); + bool acceptStructBufferType(TType&); + bool acceptStruct(TType&, TIntermNode*& nodeList); + bool acceptStructDeclarationList(TTypeList*&, TIntermNode*& nodeList, const TString& typeName, + TVector<TFunctionDeclarator>&); + bool acceptMemberFunctionDefinition(TIntermNode*& nodeList, const TType&, const TString& memberName, + TFunctionDeclarator&); bool acceptFunctionParameters(TFunction&); bool acceptParameterDeclaration(TFunction&); - bool acceptFunctionDefinition(TFunction&, TIntermNode*&, const TAttributeMap&); + bool acceptFunctionDefinition(TFunctionDeclarator&, TIntermNode*& nodeList, TVector<HlslToken>* deferredTokens); + bool acceptFunctionBody(TFunctionDeclarator& declarator, TIntermNode*& nodeList); bool acceptParenExpression(TIntermTyped*&); bool acceptExpression(TIntermTyped*&); bool acceptInitializer(TIntermTyped*&); @@ -94,7 +104,8 @@ namespace glslang { bool acceptUnaryExpression(TIntermTyped*&); bool acceptPostfixExpression(TIntermTyped*&); bool acceptConstructor(TIntermTyped*&); - bool acceptFunctionCall(HlslToken, TIntermTyped*&, TIntermTyped* base = nullptr); + bool acceptFunctionCall(HlslToken, TIntermTyped*&, TIntermTyped* objectBase = nullptr, + const TSymbol* scope = nullptr); bool acceptArguments(TFunction*, TIntermTyped*&); bool acceptLiteral(TIntermTyped*&); bool acceptCompoundStatement(TIntermNode*&); @@ -110,9 +121,11 @@ namespace glslang { bool acceptCaseLabel(TIntermNode*&); bool acceptDefaultLabel(TIntermNode*&); void acceptArraySpecifier(TArraySizes*&); - void acceptPostDecls(TQualifier&); + bool acceptPostDecls(TQualifier&); bool acceptDefaultParameterDeclaration(const TType&, TIntermTyped*&); + bool captureBlockTokens(TVector<HlslToken>& tokens); + HlslParseContext& parseContext; // state of parsing and helper functions for building the intermediate TIntermediate& intermediate; // the final product, the intermediate representation, includes the AST }; |