Ejemplo n.º 1
0
        public override int VisitCompoundStatement(CCompoundstatement node)
        {
            CEmmitableCodeContainer parent = m_parents.Peek() as CEmmitableCodeContainer;
            CCompoundStatement      rep    = new CCompoundStatement(CodeBlockType.CB_COMPOUNDSTATEMENT, 2, parent);

            parent.AddCode(rep, m_parentContexts.Peek());

            m_parents.Push(rep);
            m_parentContexts.Push(CCompoundStatement.CC_COMPOUNDSTATEMENT_BODY);
            if (m_scopeCompounds.Count() < 1)
            {
                m_scopeCompounds.Push(rep);
            }

            foreach (ASTVisitableElement child in node.GetChildrenContext(CCompoundstatement.CT_BODY))
            {
                Visit(child);
            }
            if (m_scopeCompounds.Count() >= 1)
            {
                m_scopeCompounds.Pop();
            }

            m_parents.Pop();
            m_parentContexts.Pop();

            return(0);
        }
Ejemplo n.º 2
0
        public override int VisitCompoundStatement(CCompoundstatement node)
        {
            ExtractSubgraphs(node, CCompoundstatement.CT_BODY, CCompoundstatement.ContextNames);

            base.VisitCompoundStatement(node);

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

            return(0);
        }
Ejemplo n.º 3
0
 public virtual T VisitCompoundStatement(CCompoundstatement node)
 {
     return(VisitChildren(node));
 }