コード例 #1
0
        public virtual void Visit(OperationCallExp node)
        {
            AssignIsPartOfIteratorBody(node);
            OclExpression[] arguments = new OclExpression[node.Arguments.Count + 1];
            if (node.Source is PropertyCallExp)
            {
                this.Visit((PropertyCallExp)node.Source, true);
            }
            else
            {
                node.Source.Accept(this);
            }

            arguments[0] = node.Source;
            for (int i = 0; i < node.Arguments.Count; i++)
            {
                if (node.Arguments[i] is PropertyCallExp)
                {
                    this.Visit((PropertyCallExp)node.Arguments[i], true);
                }
                else
                {
                    node.Arguments[i].Accept(this);
                }
                arguments[i + 1] = node.Arguments[i];
            }

            TranslationOption option = new TranslationOption();

            option.FormatString = OperationHelper.CreateBasicFormatString(node, arguments);
            this.SubexpressionTranslations.AddTranslationOption(node, option, arguments);
        }