HLSL: Grammar: Generalize accepting a declaration to accept an aggregate of subtrees.

This is slightly cleaner today for entry-point wrapping, which sometimes made
two subtrees for a function definition instead of just one subtree.  It will be
critical though for recognizing a struct with multiple member functions.
This commit is contained in:
John Kessenich
2017-03-07 20:44:09 -07:00
parent 057df2935a
commit ca71d946d7
5 changed files with 49 additions and 44 deletions

View File

@@ -65,7 +65,6 @@ namespace glslang {
bool acceptIdentifier(HlslToken&);
bool acceptCompilationUnit();
bool acceptDeclaration(TIntermNode*&);
bool acceptDeclaration(TIntermNode*& node1, TIntermNode*& node2);
bool acceptControlDeclaration(TIntermNode*& node);
bool acceptSamplerDeclarationDX9(TType&);
bool acceptSamplerState();
@@ -88,7 +87,7 @@ namespace glslang {
bool acceptStructDeclarationList(TTypeList*&);
bool acceptFunctionParameters(TFunction&);
bool acceptParameterDeclaration(TFunction&);
bool acceptFunctionDefinition(TFunction&, TIntermNode*& node1, TIntermNode*& node2, const TAttributeMap&);
bool acceptFunctionDefinition(TFunction&, TIntermNode*& nodeList, const TAttributeMap&);
bool acceptParenExpression(TIntermTyped*&);
bool acceptExpression(TIntermTyped*&);
bool acceptInitializer(TIntermTyped*&);