quasilyte / phpgrep

Syntax-aware grep for PHP code.
MIT License
236 stars 10 forks source link

cmd/phpgrep: fix filters #56

Closed quasilyte closed 3 years ago

quasilyte commented 3 years ago

At some point we updated php-parser. A side effect of that is that there is no need to subtract 1 from the start pos to get the [begin,end] slice. We did subtract 1 and as a result text that was forwarded to the filters always had 1 extra byte from the beginning.

This commit also adds a way to test a phpgrep binary (e2e test).

Updates #5

Signed-off-by: Iskander Sharipov quasilyte@gmail.com