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

Method continueStatement

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

Source from the content-addressed store, hash-verified

1327 }
1328
1329 public ContinueStatement continueStatement() {
1330 Token position = consume(CONTINUE);
1331
1332 String target = null;
1333
1334 switch (la(false)) {
1335 case CR:
1336 case NL:
1337 case CRNL:
1338 case PARAGRAPH_SEPARATOR:
1339 case LINE_SEPARATOR:
1340 case SEMICOLON:
1341 case RIGHT_BRACE:
1342 break;
1343 case IDENTIFIER:
1344 target = consume(IDENTIFIER).getText();
1345 break;
1346 default:
1347 throw new SyntaxError(laToken(false), "unexpected token: " + laToken(false).getText());
1348 }
1349
1350 if (!isValidContinue(target)) {
1351 if (target == null) {
1352 throw new SyntaxError(position, "continue not allowed");
1353 }
1354 throw new SyntaxError(position, "continue " + target + " not allowed");
1355 }
1356 semic();
1357 return factory.continueStatement(position, target);
1358 }
1359
1360 public BreakStatement breakStatement() {
1361 Token position = consume(BREAK);

Callers 1

statementMethod · 0.95

Calls 6

consumeMethod · 0.95
laMethod · 0.95
laTokenMethod · 0.95
isValidContinueMethod · 0.95
semicMethod · 0.95
getTextMethod · 0.45

Tested by

no test coverage detected