Changeset 10352 in webkit for trunk/JavaScriptCore/kjs/nodes2string.cpp
- Timestamp:
- Aug 26, 2005, 4:42:16 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes2string.cpp
r10218 r10352 24 24 #include "nodes.h" 25 25 26 using namespace kxmlcore; 27 26 28 namespace KJS { 27 29 /** … … 41 43 SourceStream& operator<<(Format f); 42 44 SourceStream& operator<<(const Node *); 45 template <typename T> SourceStream& operator<<(SharedPtr<T> n) { return this->operator<<(n.get()); } 43 46 private: 44 47 UString str; /* TODO: buffer */ … … 132 135 void ElementNode::streamTo(SourceStream &s) const 133 136 { 134 for (const ElementNode *n = this; n; n = n->list ) {137 for (const ElementNode *n = this; n; n = n->list.get()) { 135 138 for (int i = 0; i < n->elision; i++) 136 139 s << ","; … … 157 160 void PropertyValueNode::streamTo(SourceStream &s) const 158 161 { 159 for (const PropertyValueNode *n = this; n; n = n->list )162 for (const PropertyValueNode *n = this; n; n = n->list.get()) 160 163 s << n->name << ": " << n->assign; 161 164 } … … 182 185 { 183 186 s << expr; 184 for (ArgumentListNode *n = list ; n; n = n->list)187 for (ArgumentListNode *n = list.get(); n; n = n->list.get()) 185 188 s << ", " << n->expr; 186 189 } … … 443 446 void StatListNode::streamTo(SourceStream &s) const 444 447 { 445 for (const StatListNode *n = this; n; n = n->list )448 for (const StatListNode *n = this; n; n = n->list.get()) 446 449 s << n->statement; 447 450 } … … 460 463 { 461 464 s << var; 462 for (VarDeclListNode *n = list ; n; n = n->list)465 for (VarDeclListNode *n = list.get(); n; n = n->list.get()) 463 466 s << ", " << n->var; 464 467 } … … 578 581 void CaseBlockNode::streamTo(SourceStream &s) const 579 582 { 580 for (const ClauseListNode *n = list1 ; n; n = n->next())583 for (const ClauseListNode *n = list1.get(); n; n = n->next()) 581 584 s << n->clause(); 582 585 if (def) 583 586 s << def; 584 for (const ClauseListNode *n = list2 ; n; n = n->next())587 for (const ClauseListNode *n = list2.get(); n; n = n->next()) 585 588 s << n->clause(); 586 589 } … … 624 627 { 625 628 s << id; 626 for (ParameterNode *n = next ; n; n = n->next)629 for (ParameterNode *n = next.get(); n; n = n->next.get()) 627 630 s << ", " << n->id; 628 631 } … … 644 647 void SourceElementsNode::streamTo(SourceStream &s) const 645 648 { 646 for (const SourceElementsNode *n = this; n; n = n->elements )649 for (const SourceElementsNode *n = this; n; n = n->elements.get()) 647 650 s << n->element; 648 651 }
Note:
See TracChangeset
for help on using the changeset viewer.