Changeset 29813 in webkit for trunk/JavaScriptCore/kjs
- Timestamp:
- Jan 26, 2008, 6:16:11 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes2string.cpp
r29812 r29813 38 38 enum IndentType { Indent }; 39 39 enum UnindentType { Unindent }; 40 enum DotExprType { DotExpr};40 enum ObjectAccessType { ObjectAccess }; 41 41 42 42 class SourceStream { … … 52 52 SourceStream& operator<<(IndentType); 53 53 SourceStream& operator<<(UnindentType); 54 SourceStream& operator<<( DotExprType);54 SourceStream& operator<<(ObjectAccessType); 55 55 SourceStream& operator<<(Precedence); 56 56 SourceStream& operator<<(const Node*); … … 236 236 } 237 237 238 inline SourceStream& SourceStream::operator<<( DotExprType)238 inline SourceStream& SourceStream::operator<<(ObjectAccessType) 239 239 { 240 240 m_numberNeedsParens = true; … … 264 264 static inline void bracketNodeStreamTo(SourceStream& s, const RefPtr<ExpressionNode>& base, const RefPtr<ExpressionNode>& subscript) 265 265 { 266 s << PrecCall << base.get() << "[" << subscript.get() << "]";266 s << ObjectAccess << PrecCall << base.get() << "[" << subscript.get() << "]"; 267 267 } 268 268 269 269 static inline void dotNodeStreamTo(SourceStream& s, const RefPtr<ExpressionNode>& base, const Identifier& ident) 270 270 { 271 s << DotExpr<< PrecCall << base.get() << "." << ident;271 s << ObjectAccess << PrecCall << base.get() << "." << ident; 272 272 } 273 273 … … 393 393 void BracketAccessorNode::streamTo(SourceStream& s) const 394 394 { 395 s << PrecCall << expr1 << "[" << expr2 << "]";395 bracketNodeStreamTo(s, expr1, expr2); 396 396 } 397 397 398 398 void DotAccessorNode::streamTo(SourceStream& s) const 399 399 { 400 s << DotExpr << PrecCall << expr << "." << ident;400 dotNodeStreamTo(s, expr, ident); 401 401 } 402 402 … … 415 415 void NewExprNode::streamTo(SourceStream& s) const 416 416 { 417 s << "new " << PrecMember << expr << args;417 s << "new " << ObjectAccess << PrecMember << expr << args; 418 418 } 419 419
Note:
See TracChangeset
for help on using the changeset viewer.