import AbstractExpression from "./AbstractExpression" ; import Context from "./Context" ; export default class MinusExpression implements AbstractExpression { interpret ( context ) { const operand1 = context . pop ( ) ; const operand2 = context . pop ( ) ; if ( ! operand1 || ! operand2 ) throw new Error ( "Invalid Operation" ) ; context . push ( ( operand1 * - 1 ) + operand2 ) ; } }