MCPcopy
hub / github.com/perkeep/perkeep / expect

Function expect

clients/web/embed/less/less.js:3126–3134  ·  view source on GitHub ↗
(arg, msg, index)

Source from the content-addressed store, hash-verified

3124 }
3125
3126 function expect(arg, msg, index) {
3127 // some older browsers return typeof 'function' for RegExp
3128 var result = (arg instanceof Function) ? arg.call(parsers) : parserInput.$re(arg);
3129 if (result) {
3130 return result;
3131 }
3132 error(msg || (typeof arg === 'string' ? "expected '" + arg + "' got '" + parserInput.currentChar() + "'"
3133 : "unexpected token"));
3134 }
3135
3136 // Specialization of expect()
3137 function expectChar(arg, msg) {

Callers 1

ParserFunction · 0.85

Calls 1

errorFunction · 0.85

Tested by

no test coverage detected