{"record":{"id":"7ef6c03e01ec76cd","repo":"jdx/mise","slug":"unexpected-character","errorCode":null,"errorMessage":"unexpected character: {}","messagePattern":"unexpected character: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/aqua-registry/src/template.rs","lineNumber":182,"sourceCode":"                tokens.push(Token::Dot);\n                code = &code[1..];\n            }\n        } else {\n            // Check if it's an identifier (alphanumeric starting with letter)\n            let end = code\n                .chars()\n                .enumerate()\n                .find(|(_, c)| !c.is_alphanumeric() && *c != '_' && *c != '-')\n                .map(|(i, _)| i)\n                .unwrap_or(code.len());\n\n            if end > 0 {\n                let token_str = &code[..end];\n                // Determine if this is a function or identifier based on context\n                tokens.push(Token::Func(token_str));\n                code = &code[end..];\n            } else {\n                bail!(\"unexpected character: {}\", code.chars().next().unwrap());\n            }\n        }\n    }\n    Ok(tokens)\n}\n\nfn dotted_identifier_end(code: &str) -> Option<usize> {\n    let rest = code.strip_prefix('.')?;\n    let first = rest.chars().next()?;\n    if !first.is_alphabetic() {\n        return None;\n    }\n    Some(1 + identifier_len(rest))\n}\n\nfn identifier_len(code: &str) -> usize {\n    code.char_indices()\n        .find(|(_, c)| !c.is_alphanumeric() && *c != '_')","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/crates/aqua-registry/src/template.rs#L164-L200","documentation":"Lexer for the aqua-registry template expression language encountered a character that starts no known token (not a digit, dot, quote, identifier char, or parenthesis). The offending character is included in the message; lexing stops because the rest of the expression cannot be tokenized.","triggerScenarios":"Thrown at crates/aqua-registry/src/template.rs:182 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove or quote the unexpected character in the template string","Compare against aqua's supported template syntax (identifiers, dotted properties, quoted strings, function calls)","Add the missing character class to the lexer if the aqua grammar allows it"],"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"}