scriptorium/parser/common
Types
An error that occurred when parsing content.
pub type ParseError {
EmptyFile
HeaderMissing
MalformedFilename
YearNotInt
MonthNotInt
DayNotInt
InvalidDate
MalformedHeader(header: String)
}
Constructors
-
EmptyFile
-
HeaderMissing
-
MalformedFilename
-
YearNotInt
-
MonthNotInt
-
DayNotInt
-
InvalidDate
-
MalformedHeader(header: String)
Constants
pub const filename_postfix: String
The default file extension for source files.
Functions
pub fn parse_header(
header: String,
) -> Result(#(String, String), ParseError)
Parse given line as a header.
pub fn parse_headers(
headers: List(String),
) -> Result(List(#(String, String)), ParseError)
Parse given lines as headers.