{"record":{"id":"f6208f74bbb2a7c5","repo":"jdx/mise","slug":"expected-closing-parenthesis","errorCode":null,"errorMessage":"expected closing parenthesis","messagePattern":"expected closing parenthesis","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/aqua-registry/src/template.rs","lineNumber":244,"sourceCode":"    Ok(left)\n}\n\n/// Parse primary expressions\nfn parse_primary(tokens: &mut std::iter::Peekable<std::slice::Iter<Token>>) -> Result<Expr> {\n    skip_whitespace(tokens);\n\n    let token = tokens.next().wrap_err(\"unexpected end of expression\")?;\n\n    let expr = match token {\n        Token::Key(k) => Expr::Var(k.to_string()),\n        Token::String(s) => Expr::Literal(s.to_string()),\n        Token::LParen => {\n            // Parenthesized expression: (func arg)\n            skip_whitespace(tokens);\n            let inner = parse_pipe(tokens)?;\n            skip_whitespace(tokens);\n            if !matches!(tokens.next(), Some(Token::RParen)) {\n                bail!(\"expected closing parenthesis\");\n            }\n            inner\n        }\n        Token::Func(f) => {\n            // Function call: func arg1 arg2\n            let func_name = f.to_string();\n            let mut args = Vec::new();\n\n            // Collect arguments until we hit pipe, rparen, or end\n            loop {\n                skip_whitespace(tokens);\n\n                match tokens.peek() {\n                    None | Some(Token::Pipe) | Some(Token::RParen) => break,\n                    Some(Token::Dot) | Some(Token::Ident(_)) => break, // Stop before property access\n                    _ => {\n                        args.push(parse_arg(tokens)?);\n                    }","sourceCodeStart":226,"sourceCodeEnd":262,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/crates/aqua-registry/src/template.rs#L226-L262","documentation":"Parser for aqua template expressions consumed an opening parenthesis and parsed the inner pipe expression, but the next token was not a closing ')' — the input is unbalanced (typo, stray token, or truncated template) so parse_primary rejects it.","triggerScenarios":"Thrown at crates/aqua-registry/src/template.rs:244 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Balance the parentheses in the template expression","Check for a missing ')' after a nested function call","Simplify the expression and rebuild it piece by piece to find the typo"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}