package ppx_css

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Css_parser.Lex_bufferSource

A custom lexbuffer that automatically keeps track of the source location. This module is a thin wrapper arounds sedlexing's default buffer, which does not provide this functionality.

Sourcetype t = {
  1. buf : Sedlexing.lexbuf;
  2. mutable pos : Lexing.position;
  3. mutable pos_mark : Lexing.position;
  4. mutable last_char : int option;
  5. mutable last_char_mark : int option;
}

the lex buffer type

Sourceval of_sedlex : ?file:string -> ?pos:Lexing.position -> Sedlexing.lexbuf -> t
Sourceval of_ascii_string : ?pos:Lexing.position -> string -> t
Sourceval of_ascii_file : string -> t
Sourceval mark : t -> int -> unit

The next four functions are used by sedlex internally. See https://www.lexifi.com/sedlex/libdoc/Sedlexing.html.

Sourceval backtrack : t -> int
Sourceval start : t -> unit
Sourceval next_loc : t -> Lexing.position

location of next character

Sourceval cr : int
Sourceval next : t -> Uchar.t option

next character

Sourceval __private__next_int : t -> int
Sourceval raw : t -> Uchar.t array
Sourceval latin1 : ?skip:int -> ?drop:int -> t -> string
Sourceval utf8 : ?skip:int -> ?drop:int -> t -> string
Sourceval container_lnum_ref : int ref
Sourceval fix_loc : Location.t -> Location.t
Sourceval make_loc : ?loc_ghost:bool -> Lexing.position -> Lexing.position -> Location.t
Sourceval make_loc_and_fix : ?loc_ghost:bool -> Lexing.position -> Lexing.position -> Location.t
OCaml

Innovation. Community. Security.