pub fn parse_for_diagnostics(input: &str) -> Result<Ast, Vec<ParseDiagnostic>>Expand description
Parse SurrealQL and return structured diagnostics on error.
Unlike parse(), this function returns diagnostics with precise
source positions suitable for LSP and IDE integration.
ยงExample
let result = surql_parser::parse_for_diagnostics("SELEC * FROM user");
assert!(result.is_err());
let diags = result.unwrap_err();
assert!(!diags.is_empty());
assert_eq!(diags[0].line, 1);