Community
Participate
Working Groups
Build 20020305 For the example package validSelection; public class A_test242 { public void foo() { /*]*/for (int i= 0; i < 10; i++) foo()/*]*/; } } the new AST creates the following nodes <for> ... <expression>...</expression> </for> IMO it should be <for> ... <expression_statement> <expression>...</expression> </expression_statement> </for> As a result the end position of the for node doesn't include the semicolon.
I assume that the while node shows the same behaviour
In fact this is not true. I convert the for statement to: <for> ... <expression_statement> <expression>...</expression> </expression_statement> </for> But I simply fail in the test to retrieve the semi-colon.
You are absolutly right. Sorry for the confusion.
Fixed and released in HEAD.