private void CompileNegativeSign(Parser parser, ByteBuffer buffer, NegativeSign negativeSign, bool outputUsed) { if (!outputUsed) throw new ParserException(negativeSign.FirstToken, "This expression does nothing."); this.CompileExpression(parser, buffer, negativeSign.Root, true); buffer.Add(negativeSign.FirstToken, OpCode.NEGATIVE_SIGN); }
protected override void TranslateNegativeSign(List<string> output, NegativeSign negativeSign) { output.Add("-("); this.TranslateExpression(output, negativeSign.Root); output.Add(")"); }
protected abstract void TranslateNegativeSign(List<string> output, NegativeSign negativeSign);