caffeine_lang/phase_2/linker/specification/linker
Values
pub fn link_and_validate_specification_sub_parts(
services: List(specification_types.ServiceUnresolved),
sli_types: List(specification_types.SliTypeUnresolved),
basic_types: List(ast.BasicType),
query_template_types_unresolved: List(
specification_types.QueryTemplateTypeUnresolved,
),
) -> Result(List(ast.Service), String)
This function is a three step process. While it fundamentally enables us to resolve the specification (services), it also semantically validates that the specification makes sense; right now this just means that we’re able to link query_template_types to sli_types, query_template_filters to query_template_types, and sli_types to services.
pub fn resolve_unresolved_query_template_type(
unresolved_query_template_type: specification_types.QueryTemplateTypeUnresolved,
basic_types: List(ast.BasicType),
) -> Result(ast.QueryTemplateType, String)
This function takes an unresolved QueryTemplateType and a list of BasicTypes and returns a resolved QueryTemplateType.
pub fn resolve_unresolved_service(
unresolved_service: specification_types.ServiceUnresolved,
sli_types: List(ast.SliType),
) -> Result(ast.Service, String)
This function takes an unresolved Service and a list of SliTypes and returns a resolved Service.
pub fn resolve_unresolved_sli_type(
unresolved_sli_type: specification_types.SliTypeUnresolved,
query_template_types: List(ast.QueryTemplateType),
basic_types: List(ast.BasicType),
) -> Result(ast.SliType, String)
This function takes an unresolved SliType, a list of QueryTemplateTypes, and a list of BasicTypes and returns a resolved SliType.