From c514d18c8c2cb4241c8925c8c95230415887175d Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 11 Aug 2022 10:59:51 -0400 Subject: [PATCH] Fix Darwin codegen support for grouping in YAML expressions. (#21808) --- src/darwin/Framework/CHIP/templates/helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/darwin/Framework/CHIP/templates/helper.js b/src/darwin/Framework/CHIP/templates/helper.js index 436cd43b677035..d534312729001e 100644 --- a/src/darwin/Framework/CHIP/templates/helper.js +++ b/src/darwin/Framework/CHIP/templates/helper.js @@ -56,7 +56,7 @@ async function asTypedExpressionFromObjectiveC(value, type) let expr = []; for (let i = 0; i < tokens.length; i++) { const token = tokens[i]; - if ([ '+', '-', '/', '*', '%' ].includes(token)) { + if ([ '+', '-', '/', '*', '%', '(', ')' ].includes(token)) { expr[i] = token; } else if (!isNaN(token.replace(/ULL$|UL$|U$|LL$|L$/i, ''))) { expr[i] = await appHelper.asTypedLiteral.call(this, token, type);