MCPcopy Create free account
hub / github.com/mozilla/rhino / statements

Method statements

rhino/src/main/java/org/mozilla/javascript/Parser.java:1342–1355  ·  view source on GitHub ↗
(AstNode parent)

Source from the content-addressed store, hash-verified

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);

Callers 3

tryStatementMethod · 0.95
blockMethod · 0.95
letMethod · 0.95

Calls 9

codeBugMethod · 0.95
lineNumberMethod · 0.95
columnNumberMethod · 0.95
peekTokenMethod · 0.95
addChildMethod · 0.95
statementMethod · 0.95
setLengthMethod · 0.95
isIdeModeMethod · 0.80
setLineColumnNumberMethod · 0.80

Tested by

no test coverage detected