|
2 | 2 | tree, generating tokens identical to those produced by the tokenizer |
3 | 3 | module. |
4 | 4 |
|
5 | | -To create a tree walker for a new type of tree, you need to do |
| 5 | +To create a tree walker for a new type of tree, you need to |
6 | 6 | implement a tree walker object (called TreeWalker by convention) that |
7 | | -implements a 'serialize' methodtaking a tree as sole argument and |
8 | | -returning an iteratorgenerating tokens. |
| 7 | +implements a 'serialize' methodwhich takes a tree as sole argument and |
| 8 | +returns an iteratorwhich generates tokens. |
9 | 9 | """ |
10 | 10 |
|
11 | 11 | from __future__importabsolute_import,division,unicode_literals |
|