MCPcopy Index your code
hub / github.com/jquery/esprima / binaryPrecedence

Method binaryPrecedence

src/parser.ts:1447–1458  ·  view source on GitHub ↗
(token)

Source from the content-addressed store, hash-verified

1445 // https://tc39.github.io/ecma262/#sec-binary-logical-operators
1446
1447 binaryPrecedence(token): number {
1448 const op = token.value;
1449 let precedence;
1450 if (token.type === Token.Punctuator) {
1451 precedence = this.operatorPrecedence[op] || 0;
1452 } else if (token.type === Token.Keyword) {
1453 precedence = (op === 'instanceof' || (this.context.allowIn && op === 'in')) ? 7 : 0;
1454 } else {
1455 precedence = 0;
1456 }
1457 return precedence;
1458 }
1459
1460 parseBinaryExpression(): Node.Expression {
1461 const startToken = this.lookahead;

Callers 1

parseBinaryExpressionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected