[pypy-svn] r35126 - pypy/dist/pypy/doc
cfbolz at codespeak.net
cfbolz at codespeak.net
Wed Nov 29 16:41:16 CET 2006
Author: cfbolz
Date: Wed Nov 29 16:41:15 2006
New Revision: 35126
Modified:
pypy/dist/pypy/doc/rlib.txt
Log:
just recommend the use of the base class
Modified: pypy/dist/pypy/doc/rlib.txt
==============================================================================
--- pypy/dist/pypy/doc/rlib.txt (original)
+++ pypy/dist/pypy/doc/rlib.txt Wed Nov 29 16:41:15 2006
@@ -362,11 +362,10 @@
++++++++
To write tree visitors for the parse trees that are RPython, there is a special
-metaclass ``CreateDispatchDictionaryMetaclass`` in ``pypy.rlib.parsing.tree``_
-to use. If your class uses this, it will grow a ``dispatch(node)`` method, that
-calls an appropriate ``visit_<symbol>`` method, depending on the ``node``
-argument. Here the <symbol> is replaced by the ``symbol`` attribute of the
-visited node.
+baseclass ``RPythonVisitor`` in ``pypy.rlib.parsing.tree``_ to use. If your
+class uses this, it will grow a ``dispatch(node)`` method, that calls an
+appropriate ``visit_<symbol>`` method, depending on the ``node`` argument. Here
+the <symbol> is replaced by the ``symbol`` attribute of the visited node.
For the visitor to be RPython, the return values of all the visit methods need
to be of the same type.
More information about the Pypy-commit
mailing list