{"record":{"id":"75f3061be87bbf52","repo":"unoplatform/uno","slug":"expected-digits-after-floating-point","errorCode":null,"errorMessage":"Expected digits after floating point.","messagePattern":"Expected digits after floating point\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/Utils/XBindExpressionParser.CoreParser.cs","lineNumber":124,"sourceCode":"\n\t\t\t\tvar literal = _xBind.Substring(oldPosition, ++_position - oldPosition);\n\t\t\t\treturn new XBindLiteralArgument() { LiteralArgument = literal };\n\t\t\t}\n\t\t\telse if (char.IsDigit(Current))\n\t\t\t{\n\t\t\t\t// literal numeric argument\n\t\t\t\tvar oldPosition = _position;\n\t\t\t\twhile (char.IsDigit(Current))\n\t\t\t\t{\n\t\t\t\t\t_position++;\n\t\t\t\t}\n\n\t\t\t\tif (Current == '.')\n\t\t\t\t{\n\t\t\t\t\t_position++;\n\t\t\t\t\tif (!char.IsDigit(Current))\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception(\"Expected digits after floating point.\");\n\t\t\t\t\t}\n\n\t\t\t\t\twhile (char.IsDigit(Current))\n\t\t\t\t\t{\n\t\t\t\t\t\t_position++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tvar literal = _xBind.Substring(oldPosition, _position - oldPosition);\n\t\t\t\treturn new XBindLiteralArgument() { LiteralArgument = literal };\n\t\t\t}\n\n\t\t\treturn new XBindPathArgument() { Path = ParseXBindPath() };\n\t\t}\n\n\t\tprivate void SkipWhitespaces()\n\t\t{\n\t\t\twhile (char.IsWhiteSpace(Current))","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/unoplatform/uno/blob/04183404888ea21b4e5bfa3493e8d5f15e972c3a/src/SourceGenerators/Uno.UI.SourceGenerators/XamlGenerator/Utils/XBindExpressionParser.CoreParser.cs#L106-L142","documentation":"When parsing a numeric literal argument in x:Bind, a '.' is treated as the start of a fractional part and must be followed by at least one digit. A '.' with no following digit (e.g. '3.') throws. Example trigger: {x:Bind Foo(3.)}.","triggerScenarios":"A numeric x:Bind argument ends in '.' with no fractional digits, e.g. {x:Bind Foo(3.)} or {x:Bind Foo(.5)} when the integer portion is absent is handled separately, but '3.' specifically triggers this.","commonSituations":"Typo in a numeric x:Bind literal; trailing decimal point.","solutions":["Provide at least one digit after the '.', e.g. 3.0 instead of 3.","Drop the '.' if an integer was intended."],"exampleFix":"<!-- before -->\n<TextBlock Text=\"{x:Bind Scale(3.)}\" />\n<!-- after -->\n<TextBlock Text=\"{x:Bind Scale(3.0)}\" />","handlingStrategy":"validation","validationCode":"// Lint rule: a '.' inside a numeric x:Bind argument must be followed by a digit.\nstatic bool FractionWellFormed(string num)\n{ int i = num.IndexOf('.'); return i < 0 || (i + 1 < num.Length && char.IsDigit(num[i + 1])); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Write full fractional literals (3.0, not 3.) in x:Bind.","Drop the decimal point when an integer is intended."],"tags":["xaml","xbind","parser","binding","numeric"],"backgroundTag":null,"analyzedSha":"04183404888ea21b4e5bfa3493e8d5f15e972c3a","analyzedAt":"2026-08-13T21:08:11.651Z","schemaVersion":2},"datasetVersion":"2026-08-14T00:17:13.853Z"}