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

Method block

rhino/src/main/java/org/mozilla/javascript/Parser.java:2340–2355  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2338 }
2339
2340 private AstNode block() throws IOException {
2341 if (currentToken != Token.LC) codeBug();
2342 consumeToken();
2343 int pos = ts.tokenBeg;
2344 Scope block = new Scope(pos);
2345 block.setLineColumnNumber(lineNumber(), columnNumber());
2346 pushScope(block);
2347 try {
2348 statements(block);
2349 mustMatchToken(Token.RC, "msg.no.brace.block", true);
2350 block.setLength(ts.tokenEnd - pos);
2351 return block;
2352 } finally {
2353 popScope();
2354 }
2355 }
2356
2357 private AstNode defaultXmlNamespace() throws IOException {
2358 if (currentToken != Token.DEFAULT) codeBug();

Callers 1

statementHelperMethod · 0.95

Calls 10

codeBugMethod · 0.95
consumeTokenMethod · 0.95
lineNumberMethod · 0.95
columnNumberMethod · 0.95
pushScopeMethod · 0.95
statementsMethod · 0.95
mustMatchTokenMethod · 0.95
popScopeMethod · 0.95
setLineColumnNumberMethod · 0.80
setLengthMethod · 0.45

Tested by

no test coverage detected