import { CaretNode, h, t, VNode } from "@caret-js/core"; import { MathExpressionTag } from "../tags/mathExpression"; export class SubtractNode extends CaretNode { constructor(public minuend: CaretNode, public subtrahend: CaretNode) { super(); this.addTag(new MathExpressionTag()); } static from(minuend: CaretNode, subtrahend: CaretNode): SubtractNode { return new SubtractNode(minuend, subtrahend); } toDebugMathML(): VNode { return h( "mrow", {}, this.minuend.toDebugMathML(), h("mo", {}, t("-")), this.subtrahend.toDebugMathML() ); } }