コード例 #1
0
            public override bool Accept(FunctionCall element, int data)
            {
                foreach (var i in element.arguments)
                {
                    i.Accept(this, 0);
                }

                MethodBuilder triedMethod;

                if (parent.functions.TryGetValue(element.name, out triedMethod))
                {
                    il.Emit(OpCodes.Call, triedMethod);
                    return(triedMethod.ReturnType == typeof(void));
                }

                var method = parent.storage.GetMethod(element.name, element.GetArgumentTypes());

                il.Emit(OpCodes.Call, method);
                if (method.ReturnType == typeof(void))
                {
                    return(true);
                }
                return(false);
            }