示例#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);
            }
        }
示例#2
0
文件: ast.cs 项目: bitdotgames/bhl
 public override void DoVisit(AST_UnaryOpExp node)
 {
     Console.Write("(UOP " + node.type);
     VisitChildren(node);
     Console.Write(")");
 }
示例#3
0
文件: ast.cs 项目: bitdotgames/bhl
 public abstract void DoVisit(AST_UnaryOpExp ast);