![]() |
Spicy
|
#include <parser.h>
Public Attributes | |
std::string | name |
bool | is_public |
std::string | linker_scope |
Parse1Function | parse1 {} |
hilti::rt::any | parse2 |
Parse3Function | parse3 {} |
ContextNewFunction | context_new = nullptr |
const hilti::rt::TypeInfo * | type_info |
std::string | description |
hilti::rt::Vector< MIMEType > | mime_types |
hilti::rt::Vector< ParserPort > | ports |
std::optional< detail::ParseSinkFunction > | __parse_sink |
std::optional< std::function< void(hilti::rt::StrongReferenceGeneric, uint64_t, uint64_t)> > | __hook_gap |
std::optional< std::function< void(hilti::rt::StrongReferenceGeneric, uint64_t, const hilti::rt::Bytes &, const hilti::rt::Bytes &)> > | __hook_overlap |
std::optional< std::function< void(hilti::rt::StrongReferenceGeneric, uint64_t)> > | __hook_skipped |
std::optional< std::function< void(hilti::rt::StrongReferenceGeneric, uint64_t, const hilti::rt::Bytes &)> > | __hook_undelivered |
Runtime information about an available parser.
Note: When changing this struct, adapt the Spicy-side spicy_rt::Parser
as well.
|
inline |
Create a new instance of the context
type defined for the parser. If there's no context defined, returns an unset optional.
std::optional<std::function<void(hilti::rt::StrongReferenceGeneric, uint64_t, uint64_t)> > spicy::rt::Parser::__hook_gap |
For internal use only. Dispatcher for the corresponding unit hook.
std::optional<std::function<void(hilti::rt::StrongReferenceGeneric, uint64_t, const hilti::rt::Bytes&, const hilti::rt::Bytes&)> > spicy::rt::Parser::__hook_overlap |
For internal use only. Dispatcher for the corresponding unit hook.
std::optional<std::function<void(hilti::rt::StrongReferenceGeneric, uint64_t)> > spicy::rt::Parser::__hook_skipped |
For internal use only. Dispatcher for the corresponding unit hook.
std::optional<std::function<void(hilti::rt::StrongReferenceGeneric, uint64_t, const hilti::rt::Bytes&)> > spicy::rt::Parser::__hook_undelivered |
For internal use only. Dispatcher for the corresponding unit hook.
std::optional<detail::ParseSinkFunction> spicy::rt::Parser::__parse_sink |
For internal use only. Set by registerParser()
for units that's don't receive arguments.
ContextNewFunction spicy::rt::Parser::context_new = nullptr |
Function instantantiating a new instance of the context
defined for the parse. Unset if no context is defined.
std::string spicy::rt::Parser::description |
Human-readable description associated with this parser.
bool spicy::rt::Parser::is_public |
Whether this parser is public.
std::string spicy::rt::Parser::linker_scope |
Linker scope of the unit registering the parser. This can be used for disambiguation between linked units. Will be set/overidden by registerParser()
.
hilti::rt::Vector<MIMEType> spicy::rt::Parser::mime_types |
MIME types this parer can handle.
std::string spicy::rt::Parser::name |
Short descriptive name.
Parse1Function spicy::rt::Parser::parse1 {} |
Function performing parsing of given input into a temporary instance. This will remain unset if the unit type cannot be used through a parse1
-style function because it receives parameters.
hilti::rt::any spicy::rt::Parser::parse2 |
Function performing parsing of given input into a provided instance. The actual type of this member is Parse2Function<T>.
Parse3Function spicy::rt::Parser::parse3 {} |
Function performing parsing of given input into a ParsedUnited that will be returned. This will remain unset if the unit type cannot be used through a parse3
-style function because it receives parameters.
hilti::rt::Vector<ParserPort> spicy::rt::Parser::ports |
Well-known ports associated with this parser.