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

Method isAssignableName

src/main/java/org/dynjs/parser/js/Parser.java:404–416  ·  view source on GitHub ↗
(String name)

Source from the content-addressed store, hash-verified

402 }
403
404 protected boolean isAssignableName(String name) {
405 if (isFutureReservedWord(name)) {
406 return false;
407 }
408
409 if (currentContext().isStrict()) {
410 if (isStrictFutureReservedWord(name) || name.equals("arguments") || name.equals("eval")) {
411 return false;
412 }
413 }
414
415 return true;
416 }
417
418 protected boolean isReservedWord(Token token) {
419 return isKeyword(token.getType()) || isFutureReservedWord(token.getText());

Callers 7

propertySetMethod · 0.95
assignmentExpressionMethod · 0.95
functionExpressionMethod · 0.95
functionDeclarationMethod · 0.95
parameterMethod · 0.95
variableDeclarationMethod · 0.95
catchClauseMethod · 0.95

Calls 4

isFutureReservedWordMethod · 0.95
currentContextMethod · 0.95
isStrictMethod · 0.65

Tested by

no test coverage detected