Parser and parsing utilities for the Gleam programming language in MoonBit
Dependencies
test {
let r = @gleam.parse_text("import gleam/io\n\npub fn main() {\n io.println(\"hi\")\n}\n")
inspect(r.module_.definitions.length(), content="2")
inspect(r.has_errors(), content="false")
}moon add moonrockz/gleam-parserimport {
"moonrockz/gleam-parser" @gleam,
}fn diagnostic_description(code : String) -> String?fn parse_float_value(value : String) -> Double?test {
let r = @gleam.parse_text("pub fn main() {\n io.println(\"hi\")\n}\n")
inspect(r.module_.definitions.length(), content="1")
inspect(r.has_errors(), content="false")
}fn version() -> Stringtest {
inspect(@gleam.version().split(".").count(), content="3")
}Install
Download zipParser and parsing utilities for the Gleam programming language in MoonBit
Dependencies