Module
lexie/check
src/lexie/check.pookaA careful reading before anything is written down.
Checks a specification before anything is generated: duplicates, conflicts, invalid names, and definitions that could never match.
API reference
validate(c: Config) -> List(ConfigError)
INFERRED
fn(lexie/config.Config) -> List(lexie/config.ConfigError)Every problem with a specification, or none, sorted so the same specification always reports the same way.
import lexie/check
import lexie/config
assert check.validate(config.default_config()) == []
comment_starts(c: Config) -> List(#(String, String))
INFERRED
fn(lexie/config.Config) -> List(#(String, String))Comment openers, with their sections.
lexable_as_identifier(c: Config, text: String) -> Bool
INFERRED
fn(lexie/config.Config, String) -> BoolWould the identifier rules read this text as one identifier? A keyword
that would not, such as if!, could never be lexed as a keyword.
duplicates(items: List(String)) -> List(String)
INFERRED
fn(List(String)) -> List(String)Items that appear more than once, sorted.
escape(text: String) -> String
INFERRED
fn(String) -> StringText with line breaks, tabs and backslashes made visible.