aboutsummaryrefslogtreecommitdiffstats
path: root/lib/front.mli
diff options
context:
space:
mode:
authorMarcos Magueta <maguetamarcos@gmail.com>2026-07-12 18:27:44 -0300
committerMarcos Magueta <maguetamarcos@gmail.com>2026-07-12 18:27:44 -0300
commit27e9ddee53b8fa43725f951434404691d8012190 (patch)
treeea78559da973d4628cf135096488d55c7b7cd35e /lib/front.mli
parent257f5288a486740187e44b6ef4cadaad7166930e (diff)
downloadSOL-27e9ddee53b8fa43725f951434404691d8012190.tar.gz
SOL-27e9ddee53b8fa43725f951434404691d8012190.zip
language server over stdio, emacs mode with repl and eglot wiring
Diffstat (limited to 'lib/front.mli')
-rw-r--r--lib/front.mli15
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. *)