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

Method namedValue

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

Source from the content-addressed store, hash-verified

378 }
379
380 protected NamedValue namedValue() {
381 Token token = laToken();
382 if (!isPropertyName(token)) {
383 throw new SyntaxError(token, "expected property identifier");
384 }
385 String name = consume().getText();
386 consume(COLON);
387 Expression expr = assignmentExpression();
388
389 return new NamedValue(token, name, expr);
390 }
391
392 protected boolean isPropertyName(Token token) {
393 switch (token.getType()) {

Callers 1

objectLiteralMethod · 0.95

Calls 5

laTokenMethod · 0.95
isPropertyNameMethod · 0.95
consumeMethod · 0.95
assignmentExpressionMethod · 0.95
getTextMethod · 0.45

Tested by

no test coverage detected