rename Fragment to Block

pull/453/head
Rich-Harris 8 years ago
parent bd85ffbf28
commit 552820cd7f

@ -1,7 +1,7 @@
import CodeBuilder from '../../utils/CodeBuilder.js'; import CodeBuilder from '../../utils/CodeBuilder.js';
import deindent from '../../utils/deindent.js'; import deindent from '../../utils/deindent.js';
export default class Fragment { export default class Block {
constructor ({ generator, name, key, expression, context, contextDependencies, component, contexts, indexes, params, indexNames, listNames, getUniqueName }) { constructor ({ generator, name, key, expression, context, contextDependencies, component, contexts, indexes, params, indexNames, listNames, getUniqueName }) {
this.generator = generator; this.generator = generator;
this.name = name; this.name = name;
@ -48,7 +48,7 @@ export default class Fragment {
} }
child ( options ) { child ( options ) {
return new Fragment( Object.assign( {}, this, options, { parent: this } ) ); return new Block( Object.assign( {}, this, options, { parent: this } ) );
} }
createAnchor ( name, parentNode ) { createAnchor ( name, parentNode ) {

@ -2,7 +2,7 @@ import deindent from '../../utils/deindent.js';
import CodeBuilder from '../../utils/CodeBuilder.js'; import CodeBuilder from '../../utils/CodeBuilder.js';
import visit from './visit.js'; import visit from './visit.js';
import Generator from '../Generator.js'; import Generator from '../Generator.js';
import Fragment from './Fragment.js'; import Block from './Block.js';
import * as shared from '../../shared/index.js'; import * as shared from '../../shared/index.js';
class DomGenerator extends Generator { class DomGenerator extends Generator {
@ -17,8 +17,8 @@ class DomGenerator extends Generator {
}; };
} }
addBlock ( fragment ) { addBlock ( block ) {
this.blocks.push( fragment ); this.blocks.push( block );
} }
helper ( name ) { helper ( name ) {
@ -43,7 +43,7 @@ export default function dom ( parsed, source, options ) {
const getUniqueName = generator.getUniqueNameMaker( [ 'root' ] ); const getUniqueName = generator.getUniqueNameMaker( [ 'root' ] );
const component = getUniqueName( 'component' ); const component = getUniqueName( 'component' );
const mainFragment = new Fragment({ const mainBlock = new Block({
generator, generator,
name: generator.alias( 'create_main_fragment' ), name: generator.alias( 'create_main_fragment' ),
key: null, key: null,
@ -67,10 +67,10 @@ export default function dom ( parsed, source, options ) {
}; };
parsed.html.children.forEach( node => { parsed.html.children.forEach( node => {
visit( generator, mainFragment, state, node ); visit( generator, mainBlock, state, node );
}); });
generator.addBlock( mainFragment ); generator.addBlock( mainBlock );
const builders = { const builders = {
main: new CodeBuilder(), main: new CodeBuilder(),

@ -19,9 +19,9 @@ function stringifyProps ( props ) {
return `{ ${joined} }`; return `{ ${joined} }`;
} }
export default function visitComponent ( generator, fragment, state, node ) { export default function visitComponent ( generator, block, state, node ) {
const hasChildren = node.children.length > 0; const hasChildren = node.children.length > 0;
const name = fragment.getUniqueName( capDown( node.name === ':Self' ? generator.name : node.name ) ); const name = block.getUniqueName( capDown( node.name === ':Self' ? generator.name : node.name ) );
const local = { const local = {
name, name,
@ -38,14 +38,14 @@ export default function visitComponent ( generator, fragment, state, node ) {
generator.hasComponents = true; generator.hasComponents = true;
addComponentAttributes( generator, fragment, node, local ); addComponentAttributes( generator, block, node, local );
if ( local.allUsedContexts.length ) { if ( local.allUsedContexts.length ) {
const initialProps = local.allUsedContexts.map( contextName => { const initialProps = local.allUsedContexts.map( contextName => {
if ( contextName === 'root' ) return `root: root`; if ( contextName === 'root' ) return `root: root`;
const listName = fragment.listNames.get( contextName ); const listName = block.listNames.get( contextName );
const indexName = fragment.indexNames.get( contextName ); const indexName = block.indexNames.get( contextName );
return `${listName}: ${listName},\n${indexName}: ${indexName}`; return `${listName}: ${listName},\n${indexName}: ${indexName}`;
}).join( ',\n' ); }).join( ',\n' );
@ -53,8 +53,8 @@ export default function visitComponent ( generator, fragment, state, node ) {
const updates = local.allUsedContexts.map( contextName => { const updates = local.allUsedContexts.map( contextName => {
if ( contextName === 'root' ) return `${name}._context.root = root;`; if ( contextName === 'root' ) return `${name}._context.root = root;`;
const listName = fragment.listNames.get( contextName ); const listName = block.listNames.get( contextName );
const indexName = fragment.indexNames.get( contextName ); const indexName = block.indexNames.get( contextName );
return `${name}._context.${listName} = ${listName};\n${name}._context.${indexName} = ${indexName};`; return `${name}._context.${listName} = ${listName};\n${name}._context.${indexName} = ${indexName};`;
}).join( '\n' ); }).join( '\n' );
@ -70,14 +70,14 @@ export default function visitComponent ( generator, fragment, state, node ) {
const componentInitProperties = [ const componentInitProperties = [
`target: ${!isToplevel ? state.parentNode: 'null'}`, `target: ${!isToplevel ? state.parentNode: 'null'}`,
`_root: ${fragment.component}._root || ${fragment.component}` `_root: ${block.component}._root || ${block.component}`
]; ];
// Component has children, put them in a separate {{yield}} block // Component has children, put them in a separate {{yield}} block
if ( hasChildren ) { if ( hasChildren ) {
const params = fragment.params.join( ', ' ); const params = block.params.join( ', ' );
const childFragment = fragment.child({ const childBlock = block.child({
name: generator.getUniqueName( `render_${name}_yield_fragment` ) // TODO should getUniqueName happen inside Fragment? probably name: generator.getUniqueName( `render_${name}_yield_fragment` ) // TODO should getUniqueName happen inside Fragment? probably
}); });
@ -86,22 +86,22 @@ export default function visitComponent ( generator, fragment, state, node ) {
}); });
node.children.forEach( child => { node.children.forEach( child => {
visit( generator, childFragment, childState, child ); visit( generator, childBlock, childState, child );
}); });
const yieldFragment = fragment.getUniqueName( `${name}_yield_fragment` ); const yieldFragment = block.getUniqueName( `${name}_yield_fragment` );
fragment.builders.create.addLine( block.builders.create.addLine(
`var ${yieldFragment} = ${childFragment.name}( ${params}, ${fragment.component} );` `var ${yieldFragment} = ${childBlock.name}( ${params}, ${block.component} );`
); );
fragment.builders.update.addLine( block.builders.update.addLine(
`${yieldFragment}.update( changed, ${params} );` `${yieldFragment}.update( changed, ${params} );`
); );
componentInitProperties.push( `_yield: ${yieldFragment}`); componentInitProperties.push( `_yield: ${yieldFragment}`);
generator.addBlock( childFragment ); generator.addBlock( childBlock );
} }
const statements = []; const statements = [];
@ -114,7 +114,7 @@ export default function visitComponent ( generator, fragment, state, node ) {
const initialPropString = stringifyProps( initialProps ); const initialPropString = stringifyProps( initialProps );
if ( local.bindings.length ) { if ( local.bindings.length ) {
const initialData = fragment.getUniqueName( `${name}_initial_data` ); const initialData = block.getUniqueName( `${name}_initial_data` );
statements.push( `var ${name}_initial_data = ${initialPropString};` ); statements.push( `var ${name}_initial_data = ${initialPropString};` );
@ -138,7 +138,7 @@ export default function visitComponent ( generator, fragment, state, node ) {
` ); ` );
if ( isToplevel ) { if ( isToplevel ) {
fragment.builders.mount.addLine( `${name}._fragment.mount( target, anchor );` ); block.builders.mount.addLine( `${name}._fragment.mount( target, anchor );` );
} }
if ( local.dynamicAttributes.length ) { if ( local.dynamicAttributes.length ) {
@ -163,8 +163,8 @@ export default function visitComponent ( generator, fragment, state, node ) {
` ); ` );
} }
fragment.builders.destroy.addLine( `${name}.destroy( ${isToplevel ? 'detach' : 'false'} );` ); block.builders.destroy.addLine( `${name}.destroy( ${isToplevel ? 'detach' : 'false'} );` );
fragment.builders.create.addBlock( local.create ); block.builders.create.addBlock( local.create );
if ( !local.update.isEmpty() ) fragment.builders.update.addBlock( local.update ); if ( !local.update.isEmpty() ) block.builders.update.addBlock( local.update );
} }

@ -2,52 +2,52 @@ import CodeBuilder from '../../../utils/CodeBuilder.js';
import deindent from '../../../utils/deindent.js'; import deindent from '../../../utils/deindent.js';
import visit from '../visit.js'; import visit from '../visit.js';
export default function visitEachBlock ( generator, fragment, state, node ) { export default function visitEachBlock ( generator, block, state, node ) {
const name = generator.getUniqueName( `each_block` ); const name = generator.getUniqueName( `each_block` );
const renderer = generator.getUniqueName( `render_each_block` ); const renderer = generator.getUniqueName( `render_each_block` );
const elseName = generator.getUniqueName( `${name}_else` ); const elseName = generator.getUniqueName( `${name}_else` );
const renderElse = generator.getUniqueName( `${renderer}_else` ); const renderElse = generator.getUniqueName( `${renderer}_else` );
const i = fragment.getUniqueName( `i` ); const i = block.getUniqueName( `i` );
const params = fragment.params.join( ', ' ); const params = block.params.join( ', ' );
const listName = fragment.getUniqueName( `${name}_value` ); const listName = block.getUniqueName( `${name}_value` );
const isToplevel = !state.parentNode; const isToplevel = !state.parentNode;
generator.addSourcemapLocations( node.expression ); generator.addSourcemapLocations( node.expression );
const { dependencies, snippet } = generator.contextualise( fragment, node.expression ); const { dependencies, snippet } = generator.contextualise( block, node.expression );
const anchor = fragment.getUniqueName( `${name}_anchor` ); const anchor = block.getUniqueName( `${name}_anchor` );
fragment.createAnchor( anchor, state.parentNode ); block.createAnchor( anchor, state.parentNode );
const localVars = {}; const localVars = {};
localVars.iteration = fragment.getUniqueName( `${name}_iteration` ); localVars.iteration = block.getUniqueName( `${name}_iteration` );
localVars.iterations = fragment.getUniqueName( `${name}_iterations` ); localVars.iterations = block.getUniqueName( `${name}_iterations` );
localVars._iterations = fragment.getUniqueName( `_${name}_iterations` ); localVars._iterations = block.getUniqueName( `_${name}_iterations` );
localVars.lookup = fragment.getUniqueName( `${name}_lookup` ); localVars.lookup = block.getUniqueName( `${name}_lookup` );
localVars._lookup = fragment.getUniqueName( `_${name}_lookup` ); localVars._lookup = block.getUniqueName( `_${name}_lookup` );
fragment.builders.create.addLine( `var ${listName} = ${snippet};` ); block.builders.create.addLine( `var ${listName} = ${snippet};` );
fragment.builders.create.addLine( `var ${localVars.iterations} = [];` ); block.builders.create.addLine( `var ${localVars.iterations} = [];` );
if ( node.key ) fragment.builders.create.addLine( `var ${localVars.lookup} = Object.create( null );` ); if ( node.key ) block.builders.create.addLine( `var ${localVars.lookup} = Object.create( null );` );
if ( node.else ) fragment.builders.create.addLine( `var ${elseName} = null;` ); if ( node.else ) block.builders.create.addLine( `var ${elseName} = null;` );
const initialRender = new CodeBuilder(); const initialRender = new CodeBuilder();
if ( node.key ) { if ( node.key ) {
localVars.fragment = fragment.getUniqueName( 'fragment' ); localVars.fragment = block.getUniqueName( 'fragment' );
localVars.value = fragment.getUniqueName( 'value' ); localVars.value = block.getUniqueName( 'value' );
localVars.key = fragment.getUniqueName( 'key' ); localVars.key = block.getUniqueName( 'key' );
initialRender.addBlock( deindent` initialRender.addBlock( deindent`
var ${localVars.key} = ${listName}[${i}].${node.key}; var ${localVars.key} = ${listName}[${i}].${node.key};
${localVars.iterations}[${i}] = ${localVars.lookup}[ ${localVars.key} ] = ${renderer}( ${params}, ${listName}, ${listName}[${i}], ${i}, ${fragment.component}${node.key ? `, ${localVars.key}` : `` } ); ${localVars.iterations}[${i}] = ${localVars.lookup}[ ${localVars.key} ] = ${renderer}( ${params}, ${listName}, ${listName}[${i}], ${i}, ${block.component}${node.key ? `, ${localVars.key}` : `` } );
` ); ` );
} else { } else {
initialRender.addLine( initialRender.addLine(
`${localVars.iterations}[${i}] = ${renderer}( ${params}, ${listName}, ${listName}[${i}], ${i}, ${fragment.component} );` `${localVars.iterations}[${i}] = ${renderer}( ${params}, ${listName}, ${listName}[${i}], ${i}, ${block.component} );`
); );
} }
@ -57,29 +57,29 @@ export default function visitEachBlock ( generator, fragment, state, node ) {
); );
} }
fragment.builders.create.addBlock( deindent` block.builders.create.addBlock( deindent`
for ( var ${i} = 0; ${i} < ${listName}.length; ${i} += 1 ) { for ( var ${i} = 0; ${i} < ${listName}.length; ${i} += 1 ) {
${initialRender} ${initialRender}
} }
` ); ` );
if ( node.else ) { if ( node.else ) {
fragment.builders.create.addBlock( deindent` block.builders.create.addBlock( deindent`
if ( !${listName}.length ) { if ( !${listName}.length ) {
${elseName} = ${renderElse}( ${params}, ${fragment.component} ); ${elseName} = ${renderElse}( ${params}, ${block.component} );
${!isToplevel ? `${elseName}.mount( ${anchor}.parentNode, ${anchor} );` : ''} ${!isToplevel ? `${elseName}.mount( ${anchor}.parentNode, ${anchor} );` : ''}
} }
` ); ` );
} }
if ( isToplevel ) { if ( isToplevel ) {
fragment.builders.mount.addBlock( deindent` block.builders.mount.addBlock( deindent`
for ( var ${i} = 0; ${i} < ${localVars.iterations}.length; ${i} += 1 ) { for ( var ${i} = 0; ${i} < ${localVars.iterations}.length; ${i} += 1 ) {
${localVars.iterations}[${i}].mount( ${anchor}.parentNode, ${anchor} ); ${localVars.iterations}[${i}].mount( ${anchor}.parentNode, ${anchor} );
} }
` ); ` );
if ( node.else ) { if ( node.else ) {
fragment.builders.mount.addBlock( deindent` block.builders.mount.addBlock( deindent`
if ( ${elseName} ) { if ( ${elseName} ) {
${elseName}.mount( ${anchor}.parentNode, ${anchor} ); ${elseName}.mount( ${anchor}.parentNode, ${anchor} );
} }
@ -88,7 +88,7 @@ export default function visitEachBlock ( generator, fragment, state, node ) {
} }
if ( node.key ) { if ( node.key ) {
fragment.builders.update.addBlock( deindent` block.builders.update.addBlock( deindent`
var ${listName} = ${snippet}; var ${listName} = ${snippet};
var ${localVars._iterations} = []; var ${localVars._iterations} = [];
var ${localVars._lookup} = Object.create( null ); var ${localVars._lookup} = Object.create( null );
@ -104,7 +104,7 @@ export default function visitEachBlock ( generator, fragment, state, node ) {
${localVars._iterations}[${i}] = ${localVars._lookup}[ ${localVars.key} ] = ${localVars.lookup}[ ${localVars.key} ]; ${localVars._iterations}[${i}] = ${localVars._lookup}[ ${localVars.key} ] = ${localVars.lookup}[ ${localVars.key} ];
${localVars._lookup}[ ${localVars.key} ].update( changed, ${params}, ${listName}, ${listName}[${i}], ${i} ); ${localVars._lookup}[ ${localVars.key} ].update( changed, ${params}, ${listName}, ${listName}[${i}], ${i} );
} else { } else {
${localVars._iterations}[${i}] = ${localVars._lookup}[ ${localVars.key} ] = ${renderer}( ${params}, ${listName}, ${listName}[${i}], ${i}, ${fragment.component}${node.key ? `, ${localVars.key}` : `` } ); ${localVars._iterations}[${i}] = ${localVars._lookup}[ ${localVars.key} ] = ${renderer}( ${params}, ${listName}, ${listName}[${i}], ${i}, ${block.component}${node.key ? `, ${localVars.key}` : `` } );
} }
${localVars._iterations}[${i}].mount( ${localVars.fragment}, null ); ${localVars._iterations}[${i}].mount( ${localVars.fragment}, null );
@ -124,12 +124,12 @@ export default function visitEachBlock ( generator, fragment, state, node ) {
${localVars.lookup} = ${localVars._lookup}; ${localVars.lookup} = ${localVars._lookup};
` ); ` );
} else { } else {
fragment.builders.update.addBlock( deindent` block.builders.update.addBlock( deindent`
var ${listName} = ${snippet}; var ${listName} = ${snippet};
for ( var ${i} = 0; ${i} < ${listName}.length; ${i} += 1 ) { for ( var ${i} = 0; ${i} < ${listName}.length; ${i} += 1 ) {
if ( !${localVars.iterations}[${i}] ) { if ( !${localVars.iterations}[${i}] ) {
${localVars.iterations}[${i}] = ${renderer}( ${params}, ${listName}, ${listName}[${i}], ${i}, ${fragment.component} ); ${localVars.iterations}[${i}] = ${renderer}( ${params}, ${listName}, ${listName}[${i}], ${i}, ${block.component} );
${localVars.iterations}[${i}].mount( ${anchor}.parentNode, ${anchor} ); ${localVars.iterations}[${i}].mount( ${anchor}.parentNode, ${anchor} );
} else { } else {
${localVars.iterations}[${i}].update( changed, ${params}, ${listName}, ${listName}[${i}], ${i} ); ${localVars.iterations}[${i}].update( changed, ${params}, ${listName}, ${listName}[${i}], ${i} );
@ -143,11 +143,11 @@ export default function visitEachBlock ( generator, fragment, state, node ) {
} }
if ( node.else ) { if ( node.else ) {
fragment.builders.update.addBlock( deindent` block.builders.update.addBlock( deindent`
if ( !${listName}.length && ${elseName} ) { if ( !${listName}.length && ${elseName} ) {
${elseName}.update( changed, ${params} ); ${elseName}.update( changed, ${params} );
} else if ( !${listName}.length ) { } else if ( !${listName}.length ) {
${elseName} = ${renderElse}( ${params}, ${fragment.component} ); ${elseName} = ${renderElse}( ${params}, ${block.component} );
${elseName}.mount( ${anchor}.parentNode, ${anchor} ); ${elseName}.mount( ${anchor}.parentNode, ${anchor} );
} else if ( ${elseName} ) { } else if ( ${elseName} ) {
${elseName}.destroy( true ); ${elseName}.destroy( true );
@ -155,39 +155,39 @@ export default function visitEachBlock ( generator, fragment, state, node ) {
` ); ` );
} }
fragment.builders.destroy.addBlock( block.builders.destroy.addBlock(
`${generator.helper( 'destroyEach' )}( ${localVars.iterations}, ${isToplevel ? 'detach' : 'false'} );` ); `${generator.helper( 'destroyEach' )}( ${localVars.iterations}, ${isToplevel ? 'detach' : 'false'} );` );
if ( node.else ) { if ( node.else ) {
fragment.builders.destroy.addBlock( deindent` block.builders.destroy.addBlock( deindent`
if ( ${elseName} ) { if ( ${elseName} ) {
${elseName}.destroy( ${isToplevel ? 'detach' : 'false'} ); ${elseName}.destroy( ${isToplevel ? 'detach' : 'false'} );
} }
` ); ` );
} }
const indexNames = new Map( fragment.indexNames ); const indexNames = new Map( block.indexNames );
const indexName = node.index || fragment.getUniqueName( `${node.context}_index` ); const indexName = node.index || block.getUniqueName( `${node.context}_index` );
indexNames.set( node.context, indexName ); indexNames.set( node.context, indexName );
const listNames = new Map( fragment.listNames ); const listNames = new Map( block.listNames );
listNames.set( node.context, listName ); listNames.set( node.context, listName );
const context = generator.getUniqueName( node.context ); const context = generator.getUniqueName( node.context );
const contexts = new Map( fragment.contexts ); const contexts = new Map( block.contexts );
contexts.set( node.context, context ); contexts.set( node.context, context );
const indexes = new Map( fragment.indexes ); const indexes = new Map( block.indexes );
if ( node.index ) indexes.set( indexName, node.context ); if ( node.index ) indexes.set( indexName, node.context );
const contextDependencies = new Map( fragment.contextDependencies ); const contextDependencies = new Map( block.contextDependencies );
contextDependencies.set( node.context, dependencies ); contextDependencies.set( node.context, dependencies );
const blockParams = fragment.params.concat( listName, context, indexName ); const blockParams = block.params.concat( listName, context, indexName );
const getUniqueName = generator.getUniqueNameMaker( blockParams ); const getUniqueName = generator.getUniqueNameMaker( blockParams );
const childFragment = fragment.child({ const childBlock = block.child({
name: renderer, name: renderer,
expression: node.expression, expression: node.expression,
context: node.context, context: node.context,
@ -211,21 +211,21 @@ export default function visitEachBlock ( generator, fragment, state, node ) {
}); });
node.children.forEach( child => { node.children.forEach( child => {
visit( generator, childFragment, childState, child ); visit( generator, childBlock, childState, child );
}); });
generator.addBlock( childFragment ); generator.addBlock( childBlock );
if ( node.else ) { if ( node.else ) {
const childFragment = fragment.child({ const childBlock = block.child({
name: renderElse, name: renderElse,
getUniqueName: generator.getUniqueNameMaker( fragment.params ) getUniqueName: generator.getUniqueNameMaker( block.params )
}); });
node.else.children.forEach( child => { node.else.children.forEach( child => {
visit( generator, childFragment, childState, child ); visit( generator, childBlock, childState, child );
}); });
generator.addBlock( childFragment ); generator.addBlock( childBlock );
} }
} }

@ -1,21 +1,21 @@
import deindent from '../../../utils/deindent.js'; import deindent from '../../../utils/deindent.js';
import visit from '../visit.js'; import visit from '../visit.js';
function getConditionsAndBlocks ( generator, fragment, state, node, _name, i = 0 ) { function getConditionsAndBlocks ( generator, block, state, node, _name, i = 0 ) {
generator.addSourcemapLocations( node.expression ); generator.addSourcemapLocations( node.expression );
const name = generator.getUniqueName( `${_name}_${i}` ); const name = generator.getUniqueName( `${_name}_${i}` );
const conditionsAndBlocks = [{ const conditionsAndBlocks = [{
condition: generator.contextualise( fragment, node.expression ).snippet, condition: generator.contextualise( block, node.expression ).snippet,
block: name block: name
}]; }];
generateBlock( generator, fragment, state, node, name ); generateBlock( generator, block, state, node, name );
if ( node.else && node.else.children.length === 1 && if ( node.else && node.else.children.length === 1 &&
node.else.children[0].type === 'IfBlock' ) { node.else.children[0].type === 'IfBlock' ) {
conditionsAndBlocks.push( conditionsAndBlocks.push(
...getConditionsAndBlocks( generator, fragment, state, node.else.children[0], _name, i + 1 ) ...getConditionsAndBlocks( generator, block, state, node.else.children[0], _name, i + 1 )
); );
} else { } else {
const name = generator.getUniqueName( `${_name}_${i + 1}` ); const name = generator.getUniqueName( `${_name}_${i + 1}` );
@ -25,14 +25,14 @@ function getConditionsAndBlocks ( generator, fragment, state, node, _name, i = 0
}); });
if ( node.else ) { if ( node.else ) {
generateBlock( generator, fragment, state, node.else, name ); generateBlock( generator, block, state, node.else, name );
} }
} }
return conditionsAndBlocks; return conditionsAndBlocks;
} }
function generateBlock ( generator, fragment, state, node, name ) { function generateBlock ( generator, block, state, node, name ) {
const childFragment = fragment.child({ const childBlock = block.child({
name name
}); });
@ -42,10 +42,10 @@ function generateBlock ( generator, fragment, state, node, name ) {
// walk the children here // walk the children here
node.children.forEach( node => { node.children.forEach( node => {
visit( generator, childFragment, childState, node ); visit( generator, childBlock, childState, node );
}); });
generator.addBlock( childFragment ); generator.addBlock( childBlock );
} }
export default function visitIfBlock ( generator, fragment, state, node ) { export default function visitIfBlock ( generator, fragment, state, node ) {

Loading…
Cancel
Save