Пример #1
0
        public void Visit(CallMethodNode node)
        {
            var paren = node.GetPrecedence() < node.GetObject().GetPrecedence();

            if (paren)
            {
                source.Append("(");
            }
            if (node.GetObject() is IdentifierStringNode)
            {
                source.Append((node.GetObject() as IdentifierStringNode).GetIdentifier());
            }
            else
            {
                node.GetObject().Visit(this);
            }
            if (paren)
            {
                source.Append(")");
            }

            source.Append("." + node.GetMethod().Identifier + "(");
            node.GetParameters().Visit(this);
            source.Append(")");
        }
Пример #2
0
 public void Visit(CallMethodNode node)
 {
     visitor.OnVisit((n, v) =>
     {
         var r = n as CallMethodNode;
         if (r != null && r.GetMethod() == node.GetMethod())
         {
             Result = IsSameChildren(r, node);
         }
     });
     reference.Visit(visitor);
 }