(** Front door: text to statements. Wraps the generated lexer and parser so callers see one total function from source text to syntax or a positioned error. The REPL, the file runner, the LSP server, and the tests all enter here. *) type error = { line : int; (** 1-based, as editors count *) column : int; (** 0-based character offset in the line *) message : string; } val parse : string -> (Ast.statement list, error) result val parse_string : string -> (Ast.statement list, string) result (** [parse] with the position folded into the message, for callers that only print. *)