コード例 #1
0
ファイル: perplex.cs プロジェクト: johnmbaughman/INTERCAL
 static ConstantExpression()
 {
     eval_table["&"] = new eval_delegate(Lib.UnaryAnd16);
     eval_table["V"] = new eval_delegate(Lib.UnaryOr16);
     eval_table["v"] = new eval_delegate(Lib.UnaryOr16);
     eval_table["?"] = new eval_delegate(Lib.UnaryXor16);
 }
コード例 #2
0
        public static int eval(cef_v8context_t *self, cef_string_t *code, cef_string_t *script_url, int start_line, cef_v8value_t **retval, cef_v8exception_t **exception)
        {
            eval_delegate d;
            var           p = self->_eval;

            if (p == _pc)
            {
                d = _dc;
            }
            else
            {
                d = (eval_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(eval_delegate));
                if (_pc == IntPtr.Zero)
                {
                    _dc = d; _pc = p;
                }
            }
            return(d(self, code, script_url, start_line, retval, exception));
        }
コード例 #3
0
 public static int eval(cef_v8context_t* self, cef_string_t* code, cef_v8value_t** retval, cef_v8exception_t** exception)
 {
     eval_delegate d;
     var p = self->_eval;
     if (p == _pb) { d = _db; }
     else
     {
         d = (eval_delegate)Marshal.GetDelegateForFunctionPointer(p, typeof(eval_delegate));
         if (_pb == IntPtr.Zero) { _db = d; _pb = p; }
     }
     return d(self, code, retval, exception);
 }