35
CS269: HW/SW Engineering of Embedded Systems, Winter02
Using TM_CUSTOM (1)
•To traverse a list of nodes, use this static method:
–ArrayList TNLManip.traverseList
– (IVisitor visitor, LinkedList args, List list);
•  Example:
     public Object visitBlockNode(BlockNode node, LinkedList args)
    { 
        TNLManip.traverseList(this, args, node.getStmts());    //or
        List retValue = TNLManip.traverseList(this, args, node.getStmts());
    }
BlockNode
StatementNode
StatementNode
StatementNode