diff options
Diffstat (limited to 'lib/front.mli')
| -rw-r--r-- | lib/front.mli | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/front.mli b/lib/front.mli index 00fa65f..a4e91e6 100644 --- a/lib/front.mli +++ b/lib/front.mli @@ -1,7 +1,18 @@ (** 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 message. - The REPL, the file runner, and the tests all enter here. *) + 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. *) |
