Пример #1
0
 public static void Compile(ByteCodeCompiler bcc, ParserContext parser, ByteBuffer buffer, NegativeSign negativeSign, bool outputUsed)
 {
     if (!outputUsed)
     {
         throw new ParserException(negativeSign, "This expression does nothing.");
     }
     bcc.CompileExpression(parser, buffer, negativeSign.Root, true);
     buffer.Add(negativeSign.FirstToken, OpCode.NEGATIVE_SIGN);
 }
Пример #2
0
 protected abstract void TranslateNegativeSign(List <string> output, NegativeSign negativeSign);
Пример #3
0
 protected override void TranslateNegativeSign(List <string> output, NegativeSign negativeSign)
 {
     output.Add("-(");
     this.TranslateExpression(output, negativeSign.Root);
     output.Add(")");
 }