package lsp

  1. Overview
  2. Docs

doc/src/lsp.stdune/lexbuf.ml.html

Source file lexbuf.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 1 "submodules/dune/otherlibs/stdune-unstable/lexbuf.ml"
type t = Lexing.lexbuf

let init (t : t) ~fname =
  t.lex_curr_p <- { pos_fname = fname; pos_lnum = 1; pos_bol = 0; pos_cnum = 0 }

let from_string s ~fname =
  let t = Lexing.from_string s in
  init t ~fname;
  t

let from_channel ic ~fname =
  let t = Lexing.from_channel ic in
  init t ~fname;
  t
OCaml

Innovation. Community. Security.