phrase-engine
Version:
Language files on steroids for conversational UIs that aren't boring.
27 lines • 778 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const Node_1 = require("../Node");
const peek_1 = require("../peek");
class BrNode extends Node_1.PhraseNode {
validateNodeName(name) {
return name === 'br';
}
init(root, packet) {
this.setNextNode(peek_1.default(packet.next_stack));
}
eval(packet, branch) {
packet.sentence_components.push("\n");
return this.next().eval(packet);
}
*gen(packet) {
packet.sentence_components.push("\n");
yield* this.next().gen(packet);
packet.sentence_components.pop();
}
count(e_packet) {
const ret = this.next().count(e_packet);
return ret;
}
}
exports.BrNode = BrNode;
//# sourceMappingURL=BrNode.js.map