Beispiel #1
0
        public override void DoVisit(AST_UnaryOpExp ast)
        {
            VisitChildren(ast);

            switch (ast.type)
            {
            case EnumUnaryOp.NOT:
                Emit(Opcodes.UnaryNot);
                break;

            case EnumUnaryOp.NEG:
                Emit(Opcodes.UnaryNeg);
                break;

            default:
                throw new Exception("Not supported unary type: " + ast.type);
            }
        }
Beispiel #2
0
 public override void DoVisit(AST_UnaryOpExp node)
 {
     Console.Write("(UOP " + node.type);
     VisitChildren(node);
     Console.Write(")");
 }
Beispiel #3
0
 public abstract void DoVisit(AST_UnaryOpExp ast);