groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paolo Di Tommaso <>
Subject AST to replace `==` with `equals` method invocation
Date Sun, 10 Jun 2018 14:55:08 GMT
Dear all,

I'm trying to implement an AST transformation to replace any `==` binary
expression with a equals method call invocation as suggested here

My understanding is that it's required to override each the visitor for
each node where a binary expression can appear ie. if statement, while
statement, assignment, for loop, method call, etc.

That looks a bit overkill. I was wondering if there's a better way to
replace globally all `==` binary expressions with `equals` method


View raw message