Commit graph

4 commits

Author SHA1 Message Date
Vitalii Elenhaupt
80e2ab4f55
Ameba::Rule -> Ameba::Rule::Base 2017-11-08 00:02:32 +02:00
Vitalii Elenhaupt
e718c90f16
Source#content -> Source#code, Source::Error#pos -> Source::Error#location 2017-11-07 23:02:38 +02:00
V. Elenhaupt
adfe654733
Performance improvements (#15)
* Performance improvements

Two main changes:

1. Cache parsed AST in a Source. So Parser will parse content only once.
2. Use one unified visitor with multiple callbacks instead of multiple
visitors to traverse AST.

This improves performance significantly, for example running it on
Crystal repository takes ~1 second, which 6 times faster than before.

* Change readme example
2017-11-06 20:54:58 +02:00
Vitalii Elenhaupt
3d4c44c333
New rule: method names 2017-11-04 22:54:27 +02:00