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

Function commasep

lib/web/CodeMirror/mode/javascript/javascript.js:558–576  ·  view source on GitHub ↗
(what, end, sep)

Source from the content-addressed store, hash-verified

556 if (type == "(") return pass(functiondef);
557 }
558 function commasep(what, end, sep) {
559 function proceed(type, value) {
560 if (sep ? sep.indexOf(type) > -1 : type == ",") {
561 var lex = cx.state.lexical;
562 if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
563 return cont(function(type, value) {
564 if (type == end || value == end) return pass()
565 return pass(what)
566 }, proceed);
567 }
568 if (type == end || value == end) return cont();
569 if (sep && sep.indexOf(";") > -1) return pass(what)
570 return cont(expect(end));
571 }
572 return function(type, value) {
573 if (type == end || value == end) return cont();
574 return pass(what, proceed);
575 };
576 }
577 function contCommasep(what, end, info) {
578 for (var i = 3; i < arguments.length; i++)
579 cx.cc.push(arguments[i]);

Callers 13

expressionInnerFunction · 0.70
maybeoperatorNoCommaFunction · 0.70
contCommasepFunction · 0.70
typeexprFunction · 0.70
afterTypeFunction · 0.70
maybeTypeArgsFunction · 0.70
functiondefFunction · 0.70
functiondeclFunction · 0.70
typenameFunction · 0.70
classNameAfterFunction · 0.70
afterExportFunction · 0.70
arrayLiteralFunction · 0.70

Calls 2

contFunction · 0.70
passFunction · 0.70

Tested by

no test coverage detected