Beispiel #1
0
        public static void AddCallback <IN>(GenericLexer <IN> lexer, MethodInfo method, IN token) where IN : struct
        {
            var t  = typeof(IN);
            var rt = method.ReturnType;
            var ps = method.GetParameters();

            var callbackDelegate = (Func <Token <IN>, Token <IN> >)Delegate.CreateDelegate(typeof(Func <Token <IN>, Token <IN> >), method);

            lexer.AddCallBack(token, callbackDelegate);
        }
Beispiel #2
0
        public static void AddCallback <IN>(GenericLexer <IN> lexer, MethodInfo method, IN token) where IN : struct
        {
            var callbackDelegate = (Func <Token <IN>, Token <IN> >)Delegate.CreateDelegate(typeof(Func <Token <IN>, Token <IN> >), method);

            lexer.AddCallBack(token, callbackDelegate);
        }