MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / isEndOfExpr

Function isEndOfExpr

lib/web/jshint.js:19786–19800  ·  view source on GitHub ↗
(curr, next)

Source from the content-addressed store, hash-verified

19784 }
19785
19786 function isEndOfExpr(curr, next) {
19787 if (arguments.length === 0) {
19788 curr = state.tokens.curr;
19789 next = state.tokens.next;
19790 }
19791
19792 if (next.id === ";" || next.id === "}" || next.id === ":") {
19793 return true;
19794 }
19795 if (next.infix === curr.infix || curr.ltBoundary === "after" ||
19796 next.ltBoundary === "before") {
19797 return curr.line !== startLine(next);
19798 }
19799 return false;
19800 }
19801
19802 // This is the heart of JSHINT, the Pratt parser. In addition to parsing, it
19803 // is looking for ad hoc lint patterns. We add .fud to Pratt's model, which is

Callers 4

expressionFunction · 0.85
directivesFunction · 0.85
jshint.jsFile · 0.85
mozYieldFunction · 0.85

Calls 1

startLineFunction · 0.70

Tested by

no test coverage detected