(AstNode parent)
| 1340 | // node are given relative start positions and correct lengths. |
| 1341 | |
| 1342 | private AstNode statements(AstNode parent) throws IOException { |
| 1343 | if (currentToken != Token.LC // assertion can be invalid in bad code |
| 1344 | && !compilerEnv.isIdeMode()) codeBug(); |
| 1345 | int pos = ts.tokenBeg; |
| 1346 | AstNode block = parent != null ? parent : new Block(pos); |
| 1347 | block.setLineColumnNumber(lineNumber(), columnNumber()); |
| 1348 | |
| 1349 | int tt; |
| 1350 | while ((tt = peekToken()) > Token.EOF && tt != Token.RC) { |
| 1351 | block.addChild(statement()); |
| 1352 | } |
| 1353 | block.setLength(ts.tokenBeg - pos); |
| 1354 | return block; |
| 1355 | } |
| 1356 | |
| 1357 | private AstNode statements() throws IOException { |
| 1358 | return statements(null); |
no test coverage detected