package ocp-indent-nlfork
Install
Dune Dependency
Authors
Maintainers
Sources
md5=e9d1a7de64e169536ddf16023b111409
sha512=4637eb4ac2a47001f7b236ad7fdcbf7fe1a659e947a46aacd7ff2f2e386c82c423468aabd6adcabed8caf869d4a8f3f592ea1134b4ba77b7d37080e01cc497dc
doc/ocp-indent-nlfork.lib/IndentBlock/index.html
Module IndentBlock
Source
Indenter block
reverse block
updates the stack to account for the original indentation, assumed as correct. Useful for partial indentation
Return the padding of the block, ie expected relative indentation of sub-blocks
update t str tok
computes the new block state after processing the token tok
in block t
. The next tokens can be observed in the stream str
.
guess_indent line block
For indenting empty lines: attempt to guess what the most probable indent at this point would be
True only when the block is at the root of the file (the stack is empty, the block isn't included in any syntactical construct).
Returns true if the given block is at a top-level declaration level, ie not within any expression or type definition, but possibly inside a module, signature or class definition.