pub trait TemplateLanguage<'a> {
type Property: CoreTemplatePropertyVar<'a>;
// Required methods
fn settings(&self) -> &UserSettings;
fn build_function(
&self,
diagnostics: &mut TemplateDiagnostics,
build_ctx: &BuildContext<'_, Self::Property>,
function: &FunctionCallNode<'_>,
) -> TemplateParseResult<Self::Property>;
fn build_method(
&self,
diagnostics: &mut TemplateDiagnostics,
build_ctx: &BuildContext<'_, Self::Property>,
property: Self::Property,
function: &FunctionCallNode<'_>,
) -> TemplateParseResult<Self::Property>;
}Expand description
Callbacks to build language-specific evaluation objects from AST nodes.
Required Associated Types§
type Property: CoreTemplatePropertyVar<'a>
Required Methods§
fn settings(&self) -> &UserSettings
Sourcefn build_function(
&self,
diagnostics: &mut TemplateDiagnostics,
build_ctx: &BuildContext<'_, Self::Property>,
function: &FunctionCallNode<'_>,
) -> TemplateParseResult<Self::Property>
fn build_function( &self, diagnostics: &mut TemplateDiagnostics, build_ctx: &BuildContext<'_, Self::Property>, function: &FunctionCallNode<'_>, ) -> TemplateParseResult<Self::Property>
Translates the given global function call to a property.
This should be delegated to
CoreTemplateBuildFnTable::build_function().