src/executor.js
function executeNode(node, data, result) {
    if (node.type === "#") {
        executeText(node, data, result);
        return;
    }
    if (node.props.each) {
        executeEach(node, data, result);
        return;
    }
    if (node.props.if) {
        executeIf(node, data, result);
        return;
    }
    if (node.props.fi) {
        executeFi(node, data, result);
        return;
    }
    let props = {};
    Object.keys(node.props).forEach(key => {
        if (key !== "each" && key !== "if" && key !== "fi") {
            props[key] = Extender.processProp(node.props[key], data);
        }
    });
    let children = [];
    node.children.forEach(child => executeNode(child, data, children));
    result.push({ type: node.type, props, children });
}
function executeNode(node, data, result) {
    if (node.type === "#") {
        executeText(node, data, result);
        return;
    }
    if (node.props.each) {
        executeEach(node, data, result);
        return;
    }
    if (node.props.if) {
        executeIf(node, data, result);
        return;
    }
    if (node.props.fi) {
        executeFi(node, data, result);
        return;
    }
    let props = {};
    Object.keys(node.props).forEach(key => {
        if (key !== "each" && key !== "if" && key !== "fi") {
            props[key] = Extender.processProp(node.props[key], data);
        }
    });
    let children = [];
    node.children.forEach(child => executeNode(child, data, children));
    result.push({ type: node.type, props, children });
}
function executeNode ( node , data , result ) { if ( node . type === "#" ) { executeText ( node , data , result ) ; return ; } if ( node . props . each ) { executeEach ( node , data , result ) ; return ; } if ( node . props . if ) { executeIf ( node , data , result ) ; return ; } if ( node . props . fi ) { executeFi ( node , data , result ) ; return ; } let props = { } ; Object . keys ( node . props ) . forEach ( key => { if ( key !== "each" && key !== "if" && key !== "fi" ) { props [ key ] = Extender . processProp ( node . props [ key ] , data ) ; } } ) ; let children = [ ] ; node . children . forEach ( child => executeNode ( child , data , children ) ) ; result . push ( { type : node . type , props , children } ) ; }
(object, object, array) => undefined
( object object array ) = > undefined