@riotjs/parser
Version:
The parser for Riot tags
14 lines (13 loc) • 335 B
JavaScript
/**
* Outputs the last parsed node. Can be used with a builder too.
* @param {import("../..").ParserState} store - Parsing store
* @returns {undefined} void function
* @private
*/
export default function flush(store) {
const last = store.last
store.last = null
if (last && store.root) {
store.builder.push(last)
}
}