Ask HN: Syntax aware code search for refactoring?

1 points by Qix ↗ HN
While refactoring projects regular expressions have (particularly using regexxer) have become one of my core tools but there a couple things its really not good at such as "insert a third value to every call to the xxy function of NULL".

My solution to the problem is to create a syntax aware regular expression searcher, almost in the same way as syntax coloring works. The search syntax isn't defined yet - but simply a red '.' would mean any letter belonging to a variable, while a green '.' would be a reserved word, etc. A search like "xxy({red}.{/red},{red}.{/red}," would solve my initial problem easily. A search for "{green}array{/green}" would find all arrays, but not those inside strings.

It is (what I believe to be) a great solution to the problem but I am far too busy on my own project (SnapBill) to even think about trying to code it up. I'm posting here to ask if it already exists and I just cant find it, or can create it and release it free.

Even if you can't help I'd love to hear comments

0 comments

[ 5.2 ms ] story [ 12.9 ms ] thread

No comments yet.