Exemplo n.º 1
0
        public override int VisitFcall(CFCall node)
        {
            CIdentifier id = node.GetChild(CFCall.CT_FNAME, 0) as CIdentifier;

            m_translatedFile.DeclareFunction(id.M_Name);
            int context = m_parentContexts.Peek();
            CEmmitableCodeContainer rep = m_parents.Peek();

            rep.AddCode(id.M_Name, context);
            rep.AddCode("(", context);

            int i    = 0;
            int last = node.GetChildrenContextNumber(CFCall.CT_ARGS);

            foreach (ASTVisitableElement child in node.GetChildrenContext(CFCall.CT_ARGS))
            {
                m_functionCalls.Push(id.M_Name);
                Visit(child);
                m_functionCalls.Pop();

                if (!((i + 1) == last))
                {
                    rep.AddCode(", ", context);
                }

                i++;
            }

            rep.AddCode(")", context);
            return(0);
        }
Exemplo n.º 2
0
        public override int VisitFcall(CFCall node)
        {
            ExtractSubgraphs(node, CFCall.CT_FNAME, CFCall.ContextNames);
            ExtractSubgraphs(node, CFCall.CT_ARGS, CFCall.ContextNames);

            base.VisitFcall(node);

            m_ostream.WriteLine("{0}->{1}", currentParent.M_GraphVizName, node.M_GraphVizName);

            return(0);
        }
Exemplo n.º 3
0
 public virtual T VisitFcall(CFCall node)
 {
     return(VisitChildren(node));
 }