pub trait CoreConverter<'a, T: ConvertInfo> {
Show 18 methods
// Required methods
fn emit_error(&self, error: CompilationError);
fn get_builtin_component(&self, tag: &str) -> Option<RuntimeHelper>;
fn convert_directive(
&self,
dir: &mut Directive<'a>,
e: &mut Element<'a>,
) -> DirectiveConvertResult<T::JsExpression>;
fn convert_if(&self, elems: Vec<Element<'a>>, key: usize) -> IRNode<T>;
fn convert_for(&self, d: Directive<'a>, n: IRNode<T>) -> IRNode<T>;
fn convert_memo(&self, d: Directive<'a>, n: IRNode<T>) -> IRNode<T>;
fn convert_once(&self, d: Directive<'a>, n: IRNode<T>) -> IRNode<T>;
fn convert_slot_outlet(&self, e: Element<'a>) -> IRNode<T>;
fn convert_element(&self, e: Element<'a>) -> IRNode<T>;
fn convert_text(&self, t: TextNode<'a>) -> IRNode<T>;
fn convert_interpolation(&self, i: SourceNode<'a>) -> IRNode<T>;
fn convert_template(&self, e: Element<'a>) -> IRNode<T>;
fn convert_comment(&self, c: SourceNode<'a>) -> IRNode<T>;
// Provided methods
fn convert_core_ir(&self, ast: AstRoot<'a>) -> IRRoot<T> { ... }
fn convert_children(&self, children: Vec<AstNode<'a>>) -> Vec<IRNode<T>> { ... }
fn dispatch_ast(&self, n: AstNode<'a>) -> IRNode<T> { ... }
fn pre_convert_element(&self, e: Element<'a>) -> IRNode<T> { ... }
fn dispatch_element(&self, e: Element<'a>) -> IRNode<T> { ... }
}
Expand description
Default implementation sketch can be used in DOM/SSR. Other platform might invent and use their own IR.