{"record":{"id":"7bec8546c2552b65","repo":"unoplatform/uno","slug":"expected-after-parsing-invocation-arguments","errorCode":null,"errorMessage":"Expected ')' after parsing invocation arguments","messagePattern":"Expected '\\)' after parsing invocation arguments","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/Utils/XBindExpressionParser.CoreParser.cs","lineNumber":78,"sourceCode":"\t\t\t\t{\n\t\t\t\t\treturn new XBindInvocation() { Path = bindPath, Arguments = Array.Empty<XBindArgument>() };\n\t\t\t\t}\n\n\t\t\t\tthrow new Exception(\"Expected end of expression after invocation.\");\n\t\t\t}\n\n\n\t\t\tvar arguments = new List<XBindArgument>();\n\t\t\targuments.Add(ParseXBindArgument());\n\t\t\twhile (Current == ',')\n\t\t\t{\n\t\t\t\t_position++;\n\t\t\t\targuments.Add(ParseXBindArgument());\n\t\t\t}\n\n\t\t\tif (Current != ')')\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Expected ')' after parsing invocation arguments\");\n\t\t\t}\n\n\t\t\t_position++;\n\t\t\tif (!IsDone)\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Expected end of expression after invocation.\");\n\t\t\t}\n\n\t\t\treturn new XBindInvocation() { Path = bindPath, Arguments = arguments.ToArray() };\n\t\t}\n\n\t\tprivate XBindArgument ParseXBindArgument()\n\t\t{\n\t\t\tSkipWhitespaces();\n\t\t\tif (Current == '\"')\n\t\t\t{\n\t\t\t\t// literal string argument\n\t\t\t\tvar oldPosition = _position++;","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/unoplatform/uno/blob/04183404888ea21b4e5bfa3493e8d5f15e972c3a/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/Utils/XBindExpressionParser.CoreParser.cs#L60-L96","documentation":"After parsing one or more comma-separated arguments in an x:Bind invocation, the parser requires a closing ')'. If the arguments are not terminated by ')', it throws. Example trigger: {x:Bind Foo(a, b}.","triggerScenarios":"An x:Bind invocation with unbalanced parentheses, e.g. {x:Bind Foo(a, b} or {x:Bind Foo(a}.","commonSituations":"Missing closing parenthesis in a hand-edited x:Bind method call.","solutions":["Add the missing ')' to close the invocation.","Balance all parentheses in the x:Bind expression."],"exampleFix":"<!-- before -->\n<TextBlock Text=\"{x:Bind Concat(A, B}\" />\n<!-- after -->\n<TextBlock Text=\"{x:Bind Concat(A, B)}\" />","handlingStrategy":"validation","validationCode":"// Lint rule: every '(' in an x:Bind invocation must have a matching ')'.\nstatic bool BalancedParens(string expr) { int d = 0; foreach (var c in expr) { if (c == '(') d++; else if (c == ')') d--; if (d < 0) return false; } return d == 0; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Balance parentheses in every x:Bind method invocation.","Use an editor/linter that highlights unbalanced parens."],"tags":["xaml","xbind","parser","binding"],"backgroundTag":null,"analyzedSha":"04183404888ea21b4e5bfa3493e8d5f15e972c3a","analyzedAt":"2026-08-13T21:08:11.651Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}