示例#1
0
        public override object VisitMethodCall(MethodCallAstNode node)
        {
            var arguments = node.Arguments.Select(arg => Evaluate(arg)).ToList();

            if (arguments.Any(arg => arg.IsError))
            {
                return(arguments.First(arg => arg.IsError));
            }

            return(Result(_context.MethodInvocationCallback((string)node.Target.Value, arguments.Select(arg => arg.Value).ToList())));
        }