You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/compiler/generate/visitors/ElseBlock.js

23 lines
380 B

import counter from '../utils/counter.js';
export default {
enter ( generator ) {
const name = generator.current.name.replace( 'If', 'Else' );
generator.push({
name,
initStatements: [],
updateStatements: [],
teardownStatements: [],
counter: counter()
});
},
leave ( generator ) {
generator.addRenderer( generator.current );
generator.pop();
}
};