Files
olisp/lib/parser/parser.ml
2025-12-28 21:04:45 +03:00

17 lines
268 B
OCaml

let parse_one lb = Parse.prog (Lex.read) lb
let parse lb =
let rec helper () =
match parse_one lb with
| None -> []
| Some (t) -> t :: helper ()
in
helper ()
let parse_str s =
parse (Lexing.from_string s)
module Ast = Ast
module Parse = Parse