Compiler.Parse.Space
This module provides parsers for whitespace and comments in Gren code.
Use this to parse whitespace and comments.
This will change lineStart and comments fields of Context.
String.Parser.run parser Compiler.Parse.Context.empty source
The kind of errors that can happen while parsing whitespace and comments.
Returns a human-readable description of an Error.
Indentation helpers
This will set Context.indent to be ´Context.startLine` for the duration of
the provided parser.
This will set Context.indent to the current column for the duration of
the provided parser.
Use this to check that the current indentation is valid. That is, the current
column has to be greater than Context.indent.
This allows you to stop parsing when the indentation level decreases.
Same as checkIndent but additionally accepts an indentation equal to the
set indentation level
Check that we're at the start of a line