{"record":{"id":"b998eb90d70f296f","repo":"AvaloniaUI/Avalonia","slug":"expected-open","errorCode":null,"errorMessage":"Expected '{open}'.","messagePattern":"Expected '(.+?)'\\.","errorType":"validation","errorClass":"ExpressionParseException","httpStatus":null,"severity":"error","filePath":"src/Avalonia.Base/Data/Core/Parsers/ArgumentListParser.cs","lineNumber":50,"sourceCode":"                    else if (r.TakeIf(close))\n                    {\n                        return result;\n                    }\n                    else\n                    {\n                        if (r.Take() != delimiter)\n                        {\n                            throw new ExpressionParseException(r.Position, $\"Expected '{delimiter}'.\");\n                        }\n\n                        r.SkipWhitespace();\n                    }\n                }\n\n                throw new ExpressionParseException(r.Position, $\"Expected '{close}'.\");\n            }\n\n            throw new ExpressionParseException(r.Position, $\"Expected '{open}'.\");\n        }\n    }\n}\n","sourceCodeStart":32,"sourceCodeEnd":54,"githubUrl":"https://github.com/AvaloniaUI/Avalonia/blob/11c542726898ae954a1ef668c65ec79ec92ab17d/src/Avalonia.Base/Data/Core/Parsers/ArgumentListParser.cs#L32-L54","documentation":"ArgumentListParser.ParseArguments throws ExpressionParseException(\"Expected '{open}'.\") at line 50 when invoked but the current character is not the expected open bracket. The caller is expected to have already peeked for the open character; reaching this throw means ParseArguments was called without the open bracket present.","triggerScenarios":"Calling ParseArguments when the reader is not positioned at the open bracket character, or when the reader is at end of input. In normal grammar flow this is guarded by PeekOpenBracket, so it indicates a misuse or an orphaned direct call.","commonSituations":"A custom parser/code path calling ParseArguments directly without first checking for the open bracket; a malformed expression that slips past the grammar's peek guard.","solutions":["Ensure the reader is positioned at the open bracket before calling ParseArguments (peek first).","If you hit this from normal binding strings, check for a stray/empty expression that reached argument parsing unexpectedly."],"exampleFix":"// before - calling parse without the open bracket present\nvar args = r.ParseArguments('[', ']');\n// after\nif (!r.End && r.Peek == '[')\n    var args = r.ParseArguments('[', ']');","handlingStrategy":"try-catch","validationCode":"// ParseArguments should only be called when positioned at the open bracket.\nif (r.End || r.Peek != '[') return Array.Empty<string>();\nvar args = r.ParseArguments('[', ']');","typeGuard":null,"tryCatchPattern":"try { var args = r.ParseArguments('[', ']'); }\ncatch (ExpressionParseException ex) when (ex.Message.Contains(\"Expected '['\"))\n{ /* caller misused ParseArguments; peek for '[' first */ }","preventionTips":["Always peek for the open bracket before calling ParseArguments.","Let the grammar drive parser calls; avoid direct ParseArguments use."],"tags":["data-binding","binding-path","parser","internal-api"],"backgroundTag":null,"analyzedSha":"11c542726898ae954a1ef668c65ec79ec92ab17d","analyzedAt":"2026-08-13T11:57:40.261Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}