| Author |
Simple validator for groovy code
|
Bojan Dolinar
Greenhorn
Joined: Nov 15, 2011
Posts: 6
|
|
In our software, administrators can configure arbitrary operations on data. For example, administrator writes t1 + t2 and binds both variables. The expression is evaluated as a groovy script and it works just fine.
Now we want to supply a validation whether all the variables in expression are really bound. The simplest way would be to get a list of all dynamic variables from parser, but after a lot of searching I just didn't find a way to do it. I'm probably missing something really obvious, since that kind of information should be available. For example, when I edit groovy code in IDEA, all dynamic variables and methods are underlined.
Any pointers on this will be much appreciated. Thanks!
|
 |
Bojan Dolinar
Greenhorn
Joined: Nov 15, 2011
Posts: 6
|
|
Found it!
http://glaforge.appspot.com/article/knowing-which-variables-are-bound-or-not-in-a-groovy-script
|
 |
 |
|
|
subject: Simple validator for groovy code
|
|
|