= 1024" x-on:close-sidebar="sidebar=window.innerWidth >= 1024 && true">
package parsexp
-
parsexp
-
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
val create : ?pos:Positions.pos -> unit -> t
Create a new parser state. pos
is the initial position, it defaults to {line=1;col=0;offset=0}
.
val reset : ?pos:Positions.pos -> t -> unit
Reset the given parsing state. The following always succeed:
reset t ?pos;
assert (t = create ?pos ())
val offset : t -> int
Number of characters fed to the parser
Position in the text
val line : t -> int
val column : t -> int
val position : t -> Positions.pos
val stop : t -> unit
Prevent the state from receiving any more characters. Trying to feed more characters will result in an exception, unless the state is reset.