package fmlib
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=d47f6539af49a4c3e947dbfbe416c1e78d534897cd6d9d8e3660aae0cf8d9494
md5=d649b8a62403362bd3a24cbf1a9af590
doc/fmlib.fmlib_parse/Fmlib_parse/Indent/index.html
Module Fmlib_parse.Indent
The allowed indentations: Helper module for indentation sensitive parsing.
val initial : tInitially all indentations 0,1,... are allowed and no alignment is required.
check_position col ind Return a violation, if pos is not an allowed indentation position. Otherwise return None.
token pos ind Accept a token at column pos.
Preconditions: is_position_allowed pos ind.
align ind Set the alignment flag.
The next token sets the indentation set to {pos} where pos is the column of the token and clears the aligment flag.
left_align ind Set the alignment flag and the indentation set to {pos} where pos is the lower bound of the current set of indentation positions.
start_indent i ind Start an indented grammar construct indented by at least i relative to its parent.
If the aligmnent flag is set, indentation is ignored.
Precondition: 0 <= incr