MCPcopy Create free account
hub / github.com/dynjs/dynjs / withStatement

Method withStatement

src/main/java/org/dynjs/parser/js/Parser.java:1437–1451  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1435 }
1436
1437 public WithStatement withStatement() {
1438 if (currentContext().isStrict()) {
1439 throw new SyntaxError("with() statement not allowed in strict-mode code");
1440 }
1441
1442 Token position = consume(WITH);
1443
1444 consume(LEFT_PAREN);
1445 Expression expr = expression();
1446 consume(RIGHT_PAREN);
1447
1448 Statement body = statement();
1449
1450 return factory.withStatement(position, expr, body);
1451 }
1452
1453 public SwitchStatement switchStatement() {
1454 try {

Callers 1

statementMethod · 0.95

Calls 5

currentContextMethod · 0.95
consumeMethod · 0.95
expressionMethod · 0.95
statementMethod · 0.95
isStrictMethod · 0.65

Tested by

no test coverage detected