|
|
|
@ -7,13 +7,13 @@ export default {
|
|
|
|
|
generator.addSourcemapLocations( node.expression );
|
|
|
|
|
const { snippet } = generator.contextualise( node.expression );
|
|
|
|
|
|
|
|
|
|
generator.current.builders.init.addLine( `var last_${name} = ${snippet}` );
|
|
|
|
|
generator.addElement( name, `createText( last_${name} )`, true );
|
|
|
|
|
generator.uses.createText = true;
|
|
|
|
|
generator.addElement( name, `createText( ${snippet} )`, true );
|
|
|
|
|
generator.current.builders.init.addLine(`var last_${name} = ${snippet}`);
|
|
|
|
|
|
|
|
|
|
generator.current.builders.update.addBlock( deindent`
|
|
|
|
|
if (${snippet} !== last_${name}) {
|
|
|
|
|
${name}.data = last_${name} = ${snippet};
|
|
|
|
|
if ( ( __tmp = ${snippet} ) !== last_${name} ) {
|
|
|
|
|
${name}.data = last_${name} = __tmp;
|
|
|
|
|
}
|
|
|
|
|
` );
|
|
|
|
|
}
|
|
|
|
|