|
|
@ -11,7 +11,7 @@ function getConditionsAndBlocks ( generator, fragment, state, node, _name, i = 0
|
|
|
|
block: name
|
|
|
|
block: name
|
|
|
|
}];
|
|
|
|
}];
|
|
|
|
|
|
|
|
|
|
|
|
generateBlock( generator, fragment, state, node, name, 'block' );
|
|
|
|
generateBlock( generator, fragment, 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' ) {
|
|
|
@ -26,15 +26,14 @@ function getConditionsAndBlocks ( generator, fragment, state, node, _name, i = 0
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
if ( node.else ) {
|
|
|
|
if ( node.else ) {
|
|
|
|
generateBlock( generator, fragment, state, node.else, name, 'block' );
|
|
|
|
generateBlock( generator, fragment, state, node.else, name );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return conditionsAndBlocks;
|
|
|
|
return conditionsAndBlocks;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function generateBlock ( generator, fragment, state, node, name, type ) {
|
|
|
|
function generateBlock ( generator, fragment, state, node, name ) {
|
|
|
|
const childFragment = fragment.child({
|
|
|
|
const childFragment = fragment.child({
|
|
|
|
type,
|
|
|
|
|
|
|
|
name,
|
|
|
|
name,
|
|
|
|
builders: getBuilders()
|
|
|
|
builders: getBuilders()
|
|
|
|
});
|
|
|
|
});
|
|
|
|