diff --git a/vendor/hlslparser/src/HLSLParser.cpp b/vendor/hlslparser/src/HLSLParser.cpp index aaf73007c..6b798d561 100644 --- a/vendor/hlslparser/src/HLSLParser.cpp +++ b/vendor/hlslparser/src/HLSLParser.cpp @@ -2283,6 +2283,20 @@ bool HLSLParser::ParseBinaryExpression(int priority, HLSLExpression*& expression } else { + // Before breaking, consume end char if needed and check for more operators + if( needsExpressionEndChar != 0 ) + { + if( !Expect(needsExpressionEndChar) ) + return false; + needsExpressionEndChar = 0; + + // After consuming end char, check if there's a binary operator to continue + if (AcceptBinaryOperator(priority, binaryOp)) + { + acceptBinaryOp = true; + continue; + } + } break; }