13#include <datatype99.h>
16#include <compy/priv/compiler_attrs.h>
67 (Compy_ParseError_ContentLength, CharSlice99),
68 (Compy_ParseError_StrMismatch, CharSlice99, CharSlice99),
70 (Compy_ParseError_HeaderMapOverflow),
71 (Compy_ParseError_MissingCSeq),
72 (Compy_ParseError_InvalidCSeq, CharSlice99)
104 (Compy_ParseStatus_Complete,
size_t),
105 (Compy_ParseStatus_Partial)
128 (Compy_ParseResult_Success, Compy_ParseStatus),
129 (Compy_ParseResult_Failure, Compy_ParseError)
bool Compy_ParseStatus_is_partial(Compy_ParseStatus self) COMPY_PRIV_MUST_USE
Returns whether self is partial.
Definition error.c:81
bool Compy_ParseResult_is_complete(Compy_ParseResult self) COMPY_PRIV_MUST_USE
The same as Compy_ParseResult_is_partial but for a complete result.
Definition error.c:114
int Compy_ParseError_print(Compy_ParseError self, Compy_Writer w) COMPY_PRIV_MUST_USE
Prints self into w.
Definition error.c:20
datatype99(Compy_ParseError,(Compy_ParseError_ContentLength, CharSlice99),(Compy_ParseError_StrMismatch, CharSlice99, CharSlice99),(Compy_ParseError_TypeMismatch, Compy_ParseType, CharSlice99),(Compy_ParseError_HeaderMapOverflow),(Compy_ParseError_MissingCSeq),(Compy_ParseError_InvalidCSeq, CharSlice99))
An error that might occur during parsing.
bool Compy_ParseResult_is_success(Compy_ParseResult self) COMPY_PRIV_MUST_USE
Returns whether self is successful.
Definition error.c:93
Compy_ParseType
Types of data that can be failed to parse.
Definition error.h:21
@ Compy_ParseType_Int
An integer (-34, 0, 123).
Definition error.h:25
@ Compy_ParseType_HeaderName
A header name (Content-Length, Authorization).
Definition error.h:35
@ Compy_ParseType_Ident
An identifier (abc).
Definition error.h:30
bool Compy_ParseResult_is_failure(Compy_ParseResult self) COMPY_PRIV_MUST_USE
Returns whether self is a failure.
Definition error.c:97
Compy_ParseResult Compy_ParseResult_partial(void) COMPY_PRIV_MUST_USE
Creates a successful and partial parse result.
Definition error.c:85
const char * Compy_ParseType_str(Compy_ParseType self) COMPY_PRIV_MUST_USE
Returns a string representation of self.
Definition error.c:3
bool Compy_ParseResult_is_partial(Compy_ParseResult self) COMPY_PRIV_MUST_USE
Returns whether self is both successful and partial.
Definition error.c:101
bool Compy_ParseStatus_is_complete(Compy_ParseStatus self) COMPY_PRIV_MUST_USE
Returns whether self is complete.
Definition error.c:77
Compy_ParseResult Compy_ParseResult_complete(size_t offset) COMPY_PRIV_MUST_USE
Creates a successful and complete parse result with the byte offset offset (from the beginning of inp...
Definition error.c:89