Skip to content

Commit fa504e7

Browse files
committed
Optimize visitor implementation.
* The `visit` function will no longer attempt to deep copy nodes when there is an edit. Shallow copies are perfectly acceptable, since we are only overwriting attributes on edit. * The `Visitor` class now pre-calculates an AST Type to Handler map in the metaclass, allowing for a much quicker enter/leave implementation. * Install `six`.
1 parent 78e1eab commit fa504e7

File tree

7 files changed

+344
-35
lines changed

7 files changed

+344
-35
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ python:
88
- pypy
99
cache: pip
1010
install:
11-
- pip install --cache-dir $HOME/.cache/pip pytest-cov coveralls flake8 import-order gevent==1.1b5
11+
- pip install --cache-dir $HOME/.cache/pip pytest-cov coveralls flake8 import-order gevent==1.1b5 six>=1.10.0
1212
- pip install --cache-dir $HOME/.cache/pip pytest>=2.7.3 --upgrade
1313
- pip install -e .
1414
script:

0 commit comments

Comments
 (0)