예제 #1
0
 public void SetInvoke <R, T>(BoolOperDel <R, T> invoke)
 {
     Invoke = (r, d) => {
         T v1 = r.SPop <T>(), v2 = r.SPop <T>();
         r.SPush(invoke(v2, v1));
     };
 }
예제 #2
0
        public static Instruction From <R, T>(string name, BoolOperDel <R, T> invoke)
        {
            string retType = ParserUtil.GetCleanTypeName(typeof(R).Name);
            string type    = ParserUtil.GetCleanTypeName(typeof(T).Name);
            var    instr   = new Instruction(type, name, retType, new[] { type, type }, null);

            instr.SetInvoke(invoke);
            return(instr);
        }
예제 #3
0
 public static Instruction From <T>(string name, BoolOperDel <T, T> invoke)
 {
     return(From <T, T>(name, invoke));
 }