HLSL: allow trailing commas in initializer lists & scalar initialization
This commit is contained in:
@@ -1549,8 +1549,11 @@ bool HlslGrammar::acceptInitializer(TIntermTyped*& node)
|
||||
node = intermediate.growAggregate(node, expr, loc);
|
||||
|
||||
// COMMA
|
||||
if (acceptTokenClass(EHTokComma))
|
||||
if (acceptTokenClass(EHTokComma)) {
|
||||
if (acceptTokenClass(EHTokRightBrace)) // allow trailing comma
|
||||
return true;
|
||||
continue;
|
||||
}
|
||||
|
||||
// RIGHT_BRACE
|
||||
if (acceptTokenClass(EHTokRightBrace))
|
||||
|
||||
Reference in New Issue
Block a user