{"record":{"id":"a5d3bb0b90eefa6b","repo":"unoplatform/uno","slug":"expected-end-of-expression-after-invocation","errorCode":null,"errorMessage":"Expected end of expression after invocation.","messagePattern":"Expected end of expression after invocation\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/Utils/XBindExpressionParser.CoreParser.cs","lineNumber":64,"sourceCode":"\t\t\t{\n\t\t\t\treturn bindPath;\n\t\t\t}\n\n\t\t\tif (Current != '(')\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Expected end of x:Bind expression or start of argument list.\");\n\t\t\t}\n\n\t\t\t_position++;\n\t\t\tif (Current == ')')\n\t\t\t{\n\t\t\t\t_position++;\n\t\t\t\tif (IsDone)\n\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)","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/unoplatform/uno/blob/04183404888ea21b4e5bfa3493e8d5f15e972c3a/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/Utils/XBindExpressionParser.CoreParser.cs#L46-L82","documentation":"After matching an empty argument list '()' for an x:Bind invocation, the parser requires end-of-input; any token after the closing ')' is invalid and throws. Example trigger: {x:Bind Foo() extra}.","triggerScenarios":"An x:Bind invocation with empty args followed by trailing tokens, e.g. {x:Bind Foo()bar} or {x:Bind Foo() extra}.","commonSituations":"Malformed x:Bind method invocation in hand-edited XAML.","solutions":["Remove the trailing tokens so {x:Bind Foo()} is the whole expression.","Re-check that the method invocation is the intended complete expression."],"exampleFix":"<!-- before -->\n<TextBlock Text=\"{x:Bind Format() extra}\" />\n<!-- after -->\n<TextBlock Text=\"{x:Bind Format()}\" />","handlingStrategy":"validation","validationCode":"// Lint rule: an x:Bind invocation 'Foo()' must be immediately followed by end of expression.","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not append tokens after an x:Bind invocation.","Validate x:Bind expressions with a parser-based linter."],"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"}