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

@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "Overload400-PrecQual.1881"
#define GLSLANG_DATE "06-Mar-2017"
#define GLSLANG_REVISION "Overload400-PrecQual.1882"
#define GLSLANG_DATE "07-Mar-2017"

View File

@@ -1158,15 +1158,15 @@ TIntermAggregate* TIntermediate::growAggregate(TIntermNode* left, TIntermNode* r
return nullptr;
TIntermAggregate* aggNode = nullptr;
if (left)
if (left != nullptr)
aggNode = left->getAsAggregate();
if (! aggNode || aggNode->getOp() != EOpNull) {
if (aggNode == nullptr || aggNode->getOp() != EOpNull) {
aggNode = new TIntermAggregate;
if (left)
if (left != nullptr)
aggNode->getSequence().push_back(left);
}
if (right)
if (right != nullptr)
aggNode->getSequence().push_back(right);
return aggNode;