public void Visit(ArrayMemberNode node) { AssertResolver(); List<object> indexers = new List<object>(); foreach (var indexerNode in node.Indexers) { indexerNode.Accept(this); indexers.Add(valueStack.Pop()); } if (!node.LateEvaluation) { valueStack.Push(Resolver.ResolveArrayMember(node.Identifier, indexers)); } else { var memberInfo = new MemberInfo { Name = node.Identifier, MemberType = MemberType.Array }; memberInfo.Arguments.AddRange(indexers); valueStack.Push(memberInfo); } }
public void Visit(FunctionNode node) { List<object> parameters = new List<object>(); if (node.Parameters != null) { foreach (var paramNode in node.Parameters) { paramNode.Accept(this); parameters.Add(valueStack.Pop()); } } if (!node.LateEvaluation) { valueStack.Push(Resolver.ResolveFunctionCall(node.FunctionName, parameters)); } else { var memberInfo = new MemberInfo { Name = node.FunctionName, MemberType = MemberType.Function}; memberInfo.Arguments.AddRange(parameters); valueStack.Push(memberInfo); } }