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

Method isKeyword

src/main/java/org/dynjs/parser/js/Parser.java:422–458  ·  view source on GitHub ↗
(TokenType type)

Source from the content-addressed store, hash-verified

420 }
421
422 protected boolean isKeyword(TokenType type) {
423 switch (type) {
424 case BREAK:
425 case DO:
426 case INSTANCEOF:
427 case TYPEOF:
428 case CASE:
429 case ELSE:
430 case NEW:
431 case VAR:
432 case CATCH:
433 case FINALLY:
434 case RETURN:
435 case VOID:
436 case CONTINUE:
437 case FOR:
438 case SWITCH:
439 case WHILE:
440 case DEBUGGER:
441 case FUNCTION:
442 case THIS:
443 case WITH:
444 case DEFAULT:
445 case IF:
446 case THROW:
447 case DELETE:
448 case IN:
449 case OF:
450 case TRY:
451 case NULL:
452 case TRUE:
453 case FALSE:
454 return true;
455 }
456
457 return false;
458 }
459
460 protected boolean isFutureReservedWord(String name) {
461 switch (name) {

Callers 1

isReservedWordMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected