summaryrefslogtreecommitdiffstats
path: root/Lib/compiler/visitor.py
Commit message (Collapse)AuthorAgeFilesLines
* Change default() to use getChildNodes() instead of getChildren()Jeremy Hylton2001-08-291-3/+2
|
* Two changes to visitor API:Jeremy Hylton2001-08-271-20/+23
| | | | | | | Remove _preorder as alias for dispatch and call dispatch directly. Add an extra optional argument to walk() XXX Also comment out some code that does debugging prints.
* Add support for extra (*) arguments to preorder.Jeremy Hylton2001-04-111-3/+3
| | | | Change default dispatch to use extended call syntax in place of apply.
* Small optimizations in dispatch method: 1) lookup node's __class__ onceJeremy Hylton2000-10-251-12/+14
| | | | | and store in local; 2) define _preorder to be dispatch (rather than method that called dispatch).
* Bring Tools/compiler almost up to date. Specifically:Thomas Wouters2000-08-121-22/+22
| | | | | | | | | | - fix tab space issues (SF patch #101167 by Neil Schemenauer) - fix co_flags for classes to include CO_NEWLOCALS (SF patch #101145 by Neil) - fix for merger of UNPACK_LIST and UNPACK_TUPLE into UNPACK_SEQUENCE, (SF patch #101168 by, well, Neil :) - Adjust bytecode MAGIC to current bytecode. TODO: teach compile.py about list comprehensions.
* simplify visitor walker classJeremy Hylton2000-03-161-32/+22
| | | | | | - remove postorder - remove protocol for automatically walking children based on visitor method return value; now only walks if there is no method
* fix import to refer to compiler packageJeremy Hylton2000-03-061-1/+1
|
* factor out the tree walking/visitor code that was in compile.pyJeremy Hylton2000-03-061-0/+127