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

Method semic

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

Source from the content-addressed store, hash-verified

1209 }
1210
1211 protected void semic() {
1212 if (la() == EOF) {
1213 return;
1214 } else if (la() == RIGHT_BRACE) {
1215 return;
1216 } else if (la() == SEMICOLON) {
1217 consume(SEMICOLON);
1218 } else {
1219 Token next = consume(false);
1220 switch (next.getType()) {
1221 case CRNL:
1222 case CR:
1223 case NL:
1224 case PARAGRAPH_SEPARATOR:
1225 case LINE_SEPARATOR:
1226 break;
1227 default:
1228 throw new SyntaxError(next, "semicolon expected but saw: " + next);
1229 }
1230 }
1231 }
1232
1233 public BlockStatement block() {
1234 try {

Callers 7

variableStatementMethod · 0.95
expressionStatementMethod · 0.95
continueStatementMethod · 0.95
breakStatementMethod · 0.95
returnStatementMethod · 0.95
throwStatementMethod · 0.95
debuggerStatementMethod · 0.95

Calls 3

laMethod · 0.95
consumeMethod · 0.95
getTypeMethod · 0.95

Tested by

no test coverage detected