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

Method ifStatement

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

Source from the content-addressed store, hash-verified

1310 }
1311
1312 public IfStatement ifStatement() {
1313 Token position = consume(IF);
1314
1315 consume(LEFT_PAREN);
1316 Expression testExpr = expression();
1317 consume(RIGHT_PAREN);
1318
1319 Statement body = statement();
1320
1321 if (la() == ELSE) {
1322 consume(ELSE);
1323 Statement elseBody = statement();
1324 return factory.ifStatement(position, testExpr, body, elseBody);
1325 }
1326 return factory.ifStatement(position, testExpr, body);
1327 }
1328
1329 public ContinueStatement continueStatement() {
1330 Token position = consume(CONTINUE);

Callers 1

statementMethod · 0.95

Calls 4

consumeMethod · 0.95
expressionMethod · 0.95
statementMethod · 0.95
laMethod · 0.95

Tested by

no test coverage detected