Return to Roc packages
Documentation
Parser
▶
Parser
ParseResult
build_primitive_parser
parse_partial
parse
fail
const
alt
apply
one_of
map
map2
map3
flatten
lazy
maybe
many
one_or_more
between
sep_by1
sep_by
ignore
keep
skip
chomp_until
chomp_while
String
▶
Utf8
parse_str
parse_str_partial
parse_utf8
parse_utf8_partial
codeunit_satisfies
codeunit
utf8
string
any_codeunit
any_thing
any_string
digit
digits
one_of
str_from_utf8
str_from_ascii
CSV
▶
CSV
CSVRecord
parse_str
parse_csv
record
field
string
u64
f64
parse_str_to_csv_record
file
HTTP
▶
Request
Response
request
response
Markdown
▶
Markdown
all
heading
link
image
code
Xml
▶
Xml
XmlDeclaration
XmlVersion
Node
Attribute
xml_parser
(press
s
)
Parser
.
Parser
Parser
.
ParseResult
Parser
.
build_primitive_parser
: (input -> ParseResult input a) -> Parser input a
Parser
.
parse_partial
: Parser input a, input -> ParseResult input a
Parser
.
parse
: Parser input a, input, (input -> Bool) -> Result a [ ParsingFailure Str, ParsingIncomplete input ]
Parser
.
fail
: Str -> Parser * *
Parser
.
const
: a -> Parser * a
Parser
.
alt
: Parser input a, Parser input a -> Parser input a
Parser
.
apply
: Parser input (a -> b), Parser input a -> Parser input b
Parser
.
one_of
: List (Parser input a) -> Parser input a
Parser
.
map
: Parser input a, (a -> b) -> Parser input b
Parser
.
map2
: Parser input a, Parser input b, (a, b -> c) -> Parser input c
Parser
.
map3
: Parser input a, Parser input b, Parser input c, (a, b, c -> d) -> Parser input d
Parser
.
flatten
: Parser input (Result a Str) -> Parser input a
Parser
.
lazy
: ({} -> Parser input a) -> Parser input a
Parser
.
maybe
: Parser input a -> Parser input (Result a [Nothing])
Parser
.
many
: Parser input a -> Parser input (List a)
Parser
.
one_or_more
: Parser input a -> Parser input (List a)
Parser
.
between
: Parser input a, Parser input open, Parser input close -> Parser input a
Parser
.
sep_by1
: Parser input a, Parser input sep -> Parser input (List a)
Parser
.
sep_by
: Parser input a, Parser input sep -> Parser input (List a)
Parser
.
ignore
: Parser input a -> Parser input {}
Parser
.
keep
: Parser input (a -> b), Parser input a -> Parser input b
Parser
.
skip
: Parser input a, Parser input * -> Parser input a
Parser
.
chomp_until
: a -> Parser (List a) (List a) where a implements Eq
Parser
.
chomp_while
: (a -> Bool) -> Parser (List a) (List a) where a implements Eq
String
.
Utf8
String
.
parse_str
: Parser Utf8 a, Str -> Result a [ ParsingFailure Str, ParsingIncomplete Str ]
String
.
parse_str_partial
: Parser Utf8 a, Str -> Parser.ParseResult Str a
String
.
parse_utf8
: Parser Utf8 a, Utf8 -> Result a [ ParsingFailure Str, ParsingIncomplete Utf8 ]
String
.
parse_utf8_partial
: Parser Utf8 a, Utf8 -> Parser.ParseResult Utf8 a
String
.
codeunit_satisfies
: (U8 -> Bool) -> Parser Utf8 U8
String
.
codeunit
: U8 -> Parser Utf8 U8
String
.
utf8
: List U8 -> Parser Utf8 (List U8)
String
.
string
: Str -> Parser Utf8 Str
String
.
any_codeunit
: Parser Utf8 U8
String
.
any_thing
: Parser Utf8 Utf8
String
.
any_string
: Parser Utf8 Str
String
.
digit
: Parser Utf8 U64
String
.
digits
: Parser Utf8 U64
String
.
one_of
: List (Parser Utf8 a) -> Parser Utf8 a
String
.
str_from_utf8
: Utf8 -> Str
String
.
str_from_ascii
: U8 -> Str
CSV
.
CSV
CSV
.
CSVRecord
CSV
.
parse_str
: Parser CSVRecord a, Str -> Result (List a) [ ParsingFailure Str, SyntaxError Str, ParsingIncomplete CSVRecord ]
CSV
.
parse_csv
: Parser CSVRecord a, CSV -> Result (List a) [ ParsingFailure Str, ParsingIncomplete CSVRecord ]
CSV
.
record
: a -> Parser CSVRecord a
CSV
.
field
: Parser String.Utf8 a -> Parser CSVRecord a
CSV
.
string
: Parser CSVField Str
CSV
.
u64
: Parser CSVField U64
CSV
.
f64
: Parser CSVField F64
CSV
.
parse_str_to_csv_record
: Str -> Result CSVRecord [ ParsingFailure Str, ParsingIncomplete String.Utf8 ]
CSV
.
file
: Parser String.Utf8 CSV
HTTP
.
Request
HTTP
.
Response
HTTP
.
request
: Parser String.Utf8 Request
HTTP
.
response
: Parser String.Utf8 Response
Markdown
.
Markdown
Markdown
.
all
: Parser String.Utf8 (List Markdown)
Markdown
.
heading
: Parser String.Utf8 Markdown
Markdown
.
link
: Parser String.Utf8 Markdown
Markdown
.
image
: Parser String.Utf8 Markdown
Markdown
.
code
: Parser String.Utf8 Markdown
Xml
.
Xml
Xml
.
XmlDeclaration
Xml
.
XmlVersion
Xml
.
Node
Xml
.
Attribute
Xml
.
xml_parser
: Parser Utf8 Xml
Exposed Modules
LLM docs
Parser
String
CSV
HTTP
Markdown
Xml