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

Method checkAssignmentLHS

src/main/java/org/dynjs/parser/js/Parser.java:612–622  ·  view source on GitHub ↗
(Expression expr)

Source from the content-addressed store, hash-verified

610 }
611
612 protected void checkAssignmentLHS(Expression expr) {
613 if (currentContext().isStrict()) {
614 if (expr instanceof IdentifierReferenceExpression) {
615 String id = ((IdentifierReferenceExpression) expr).getIdentifier();
616 if (id.equals("eval") || id.equals("arguments")) {
617 throw new ThrowException(null, this.compilationContext.createSyntaxError(id
618 + " may not appear on the left-hand-side of a compound assignment expression in strict mode"));
619 }
620 }
621 }
622 }
623
624 public Expression conditionalExpression(boolean noIn) {
625 Expression expr = logicalOrExpression(noIn);

Callers 3

assignmentExpressionMethod · 0.95
unaryExpressionMethod · 0.95
postfixExpressionMethod · 0.95

Calls 4

currentContextMethod · 0.95
isStrictMethod · 0.65
createSyntaxErrorMethod · 0.65
getIdentifierMethod · 0.45

Tested by

no test coverage detected