Ignore:
Timestamp:
Dec 30, 2002, 3:17:23 PM (22 years ago)
Author:
darin
Message:

Reviewed by Don and Maciej.

  • follow-on to my fix for 3134693 that fixes one more case of recursion and simplifies further
  • kjs/grammar.y: Remove SourceElementNode and just use a StatementNode instead. Reverse SourceElements rule so the recursive rule comes first as in the original KJS code (avoids actual parser recursion).
  • kjs/grammar.cpp: Regenerated.
  • kjs/grammar.cpp.h: Regenerated.
  • kjs/grammar.h: Regenerated.
  • kjs/nodes.h: Make processFuncDecl a virtual function in StatementNode so that we can use a StatementNode instead of a SourceElementNode. Add a call to reverseList in BlockNode to correct the order of the linked list in SourceElementsNode, to replace the technique where we reversed it in the parser. Remove SourceElementNode class, and make the element in SourceElementsNode be a StatementNode instead.
  • kjs/nodes.cpp: Remove SourceElementNode code. (StatementNode::processFuncDecl): Added empty function. (BlockNode::reverseList): Added. Used to make the SourceElements list ordered correctly.
  • kjs/nodes2string.cpp: Remove SourceElementNode code.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/nodes2string.cpp

    r3192 r3215  
    596596}
    597597
    598 void SourceElementNode::streamTo(SourceStream &s) const
    599 {
    600   if (statement)
    601     s << statement;
    602   else
    603     s << function;
    604 }
    605 
    606598void SourceElementsNode::streamTo(SourceStream &s) const
    607599{
Note: See TracChangeset for help on using the changeset viewer.