Lines Matching refs:source

1 let source, pos, end;
40 function parseCJS (source, name = '@') {
43 parseSource(source);
46 e.message += `\n at ${name}:${source.slice(0, pos).split('\n').length}:${pos - source.lastIndexOf('\n', pos - 1)}`;
86 source = cjsSource;
88 end = source.length - 1;
92 if (source.charCodeAt(0) === 35/*#*/ && source.charCodeAt(1) === 33/*!*/) {
93 if (source.length === 2)
97 ch = source.charCodeAt(pos);
104 ch = source.charCodeAt(pos);
112 if (source.startsWith('mport', pos + 1) && keywordStart(pos))
123 if (source.startsWith('interopRequireWildcard', pos + 1) && (keywordStart(pos) || source.charCodeAt(pos - 1) === 46/*.*/)) {
126 if (source.charCodeAt(pos) === 40/*(*/) {
134 else if (source.startsWith('_export', pos + 1) && (keywordStart(pos) || source.charCodeAt(pos - 1) === 46/*.*/)) {
136 if (source.startsWith('Star', pos))
138 if (source.charCodeAt(pos) === 40/*(*/) {
140 if (source.charCodeAt(++pos) === 114/*r*/)
151 if (source.startsWith('xport', pos + 1) && keywordStart(pos)) {
152 if (source.charCodeAt(pos + 6) === 115/*s*/)
159 if (keywordStart(pos) && source.startsWith('lass', pos + 1) && isBrOrWs(source.charCodeAt(pos + 5)))
163 if (source.startsWith('odule', pos + 1) && keywordStart(pos))
167 if (source.startsWith('bject', pos + 1) && keywordStart(pos))
203 const next_ch = source.charCodeAt(pos + 1);
219 const lastToken = source.charCodeAt(lastTokenPos);
221 !(lastToken === 46/*.*/ && (source.charCodeAt(lastTokenPos - 1) >= 48/*0*/ && source.charCodeAt(lastTokenPos - 1) <= 57/*9*/)) &&
222 !(lastToken === 43/*+*/ && source.charCodeAt(lastTokenPos - 1) === 43/*+*/) && !(lastToken === 45/*-*/ && source.charCodeAt(lastTokenPos - 1) === 45/*-*/) ||
252 while (source.charCodeAt(bPos) === 32/* */ && bPos >= 0)
254 if (source.charCodeAt(bPos) === 61/*=*/) {
256 while (source.charCodeAt(bPos) === 32/* */ && bPos >= 0)
269 if (identifierStart && source.charCodeAt(bPos) === 32/* */) {
270 const starExportId = source.slice(bPos + 1, id_end + 1);
271 while (source.charCodeAt(bPos) === 32/* */ && bPos >= 0)
273 switch (source.charCodeAt(bPos)) {
275 if (!source.startsWith('va', bPos - 2))
279 if (!source.startsWith('le', bPos - 2) && !source.startsWith('cons', bPos - 4))
292 if (ch !== 79/*O*/ || !source.startsWith('bject', pos + 1)) return false;
299 if (!source.startsWith('rototype', pos + 1)) return false;
306 if (ch !== 104/*h*/ || !source.startsWith('asOwnProperty', pos + 1)) return false;
312 if (ch !== 99/*c*/ || !source.startsWith('all', pos + 1)) return false;
323 if (!source.startsWith(it_id, pos)) return false;
338 if (ch === 100/*d*/ && source.startsWith('efineProperty', pos + 1)) {
355 expt = source.slice(exportPos, ++pos);
364 if (!source.startsWith('numerable', pos + 1)) break;
370 if (ch !== 116/*t*/ || !source.startsWith('rue', pos + 1)) break;
378 if (!source.startsWith('alue', pos + 1)) break;
387 if (!source.startsWith('et', pos + 1)) break;
394 if (!source.startsWith('unction', pos + 1)) break;
411 if (!source.startsWith('eturn', pos + 1)) break;
457 else if (keys && ch === 107/*k*/ && source.startsWith('eys', pos + 1)) {
467 const id = source.slice(id_start, pos);
476 if (ch !== 102/*f*/ || !source.startsWith('orEach', pos + 1)) break;
483 if (ch !== 102/*f*/ || !source.startsWith('unction', pos + 1)) break;
491 const it_id = source.slice(it_id_start, pos);
499 if (ch !== 105/*i*/ || source.charCodeAt(pos + 1) !== 102/*f*/) break;
505 if (!source.startsWith(it_id, pos)) break;
510 if (!source.startsWith('==', pos + 1)) break;
515 if (!source.startsWith('default', pos + 1)) break;
521 if (ch !== 124/*|*/ || source.charCodeAt(pos + 1) !== 124/*|*/) break;
524 if (source.slice(pos, pos + it_id.length) !== it_id) break;
527 if (ch !== 61/*=*/ || source.slice(pos + 1, pos + 3) !== '==') break;
532 if (!source.startsWith('__esModule', pos + 1)) break;
541 if (ch !== 114/*r*/ || !source.startsWith('eturn', pos + 1)) break;
549 if (ch === 105/*i*/ && source.charCodeAt(pos + 1) === 102/*f*/) {
562 if (ch !== 114/*r*/ || !source.startsWith('eturn', pos + 1)) break;
569 if (ch === 105/*i*/ && source.charCodeAt(pos + 1) === 102/*f*/) {
585 if (!source.startsWith(it_id, pos)) break;
588 if (ch !== 105/*i*/ || !source.startsWith('n ', pos + 1)) break;
593 if (ch !== 38/*&*/ || source.charCodeAt(pos + 1) !== 38/*&*/) break;
601 if (!source.startsWith(it_id, pos)) break;
607 if (ch !== 61/*=*/ || !source.startsWith('==', pos + 1)) break;
610 if (!source.startsWith(id, pos)) break;
616 if (!source.startsWith(it_id, pos)) break;
625 if (ch !== 114/*r*/ || !source.startsWith('eturn', pos + 1)) break;
636 if (!source.startsWith('==', pos + 1)) break;
641 if (!source.startsWith('default', pos + 1)) break;
648 if (source.charCodeAt(pos + 1) !== 38/*&*/) break;
654 if (ch === 79/*O*/ && source.startsWith('bject', pos + 1) && source[pos + 6] === '.') {
662 if (ch !== 104/*h*/ || !source.startsWith('asOwnProperty', pos + 1)) break;
668 if (!source.startsWith(it_id, pos)) break;
689 if (source.slice(pos, pos + it_id.length) !== it_id) break;
698 if (source.slice(pos, pos + id.length) !== id) break;
704 if (source.slice(pos, pos + it_id.length) !== it_id) break;
717 if (source.slice(pos + 1, pos + 6) !== 'bject') break;
723 if (ch !== 100/*d*/ || !source.startsWith('efineProperty', pos + 1)) break;
734 if (!source.startsWith(it_id, pos)) break;
743 if (ch !== 101/*e*/ || !source.startsWith('numerable', pos + 1)) break;
749 if (ch !== 116/*t*/ && !source.startsWith('rue', pos + 1)) break;
755 if (ch !== 103/*g*/ || !source.startsWith('et', pos + 1)) break;
762 if (!source.startsWith('unction', pos + 1)) break;
778 if (ch !== 114/*r*/ || !source.startsWith('eturn', pos + 1)) break;
781 if (!source.startsWith(id, pos)) break;
787 if (!source.startsWith(it_id, pos)) break;
837 if (ch === 109/*m*/ && source.startsWith('odule', pos + 1)) {
847 if (ch === 101/*e*/ && source.startsWith('xports', pos + 1)) {
864 if (ch === 101/*e*/ && source.startsWith('xports', pos + 1)) {
886 _exports.add(decode(source.slice(startPos, endPos)));
905 _exports.add(decode(source.slice(startPos, endPos)));
934 if (source.startsWith('equire', pos + 1)) {
948 reexports.add(decode(source.slice(reexportStart, reexportEnd)));
951 reexports.add(decode(source.slice(reexportStart, reexportEnd)));
954 lastStarExportSpecifier = decode(source.slice(reexportStart, reexportEnd));
981 ch = source.charCodeAt(pos);
983 _exports.add(decode(source.slice(startPos, endPos)));
985 else if (ch === 46/*.*/ && source.startsWith('..', pos + 1)) {
987 if (source.charCodeAt(pos) === 114/*r*/ && tryParseRequire(ExportAssign)) {
1009 ch = source.charCodeAt(pos);
1010 _exports.add(decode(source.slice(startPos, endPos)));
1120 let ch = source.codePointAt(pos);
1124 while (ch = source.codePointAt(pos)) {
1146 const ch = source.charCodeAt(bPos);
1148 return (((source.charCodeAt(bPos - 1) & 0x3FF) << 10) | (ch & 0x3FF)) + 0x10000;
1195 ch = source.charCodeAt(pos);
1197 const next_ch = source.charCodeAt(pos + 1);
1214 const ch = source.charCodeAt(pos);
1215 if (ch === 36/*$*/ && source.charCodeAt(pos + 1) === 123/*{*/) {
1232 const ch = source.charCodeAt(pos);
1233 if (ch === 42/***/ && source.charCodeAt(pos + 1) === 47/*/*/) {
1242 const ch = source.charCodeAt(pos);
1250 let ch = source.charCodeAt(pos);
1254 ch = source.charCodeAt(++pos);
1255 if (ch === 13/*\r*/ && source.charCodeAt(pos + 1) === 10/*\n*/)
1266 let ch = source.charCodeAt(pos);
1279 let ch = source.charCodeAt(pos);
1307 return pos === 0 || isBrOrWsOrPunctuatorNotDot(source.charCodeAt(pos - 1));
1313 return source.startsWith(match, pos - match.length + 1) && (pos === 0 || isBrOrWsOrPunctuatorNotDot(source.charCodeAt(pos - match.length)));
1317 return source.charCodeAt(pos) === ch && (pos === 0 || isBrOrWsOrPunctuatorNotDot(source.charCodeAt(pos - 1)));
1323 switch (source.charCodeAt(pos)) {
1325 switch (source.charCodeAt(pos - 1)) {
1336 switch (source.charCodeAt(pos - 1)) {
1338 switch (source.charCodeAt(pos - 2)) {
1355 if (source.charCodeAt(pos - 1) !== 111/*o*/ || source.charCodeAt(pos - 2) !== 101/*e*/)
1357 switch (source.charCodeAt(pos - 3)) {
1380 switch (source.charCodeAt(pos - 1)) {
1395 return source.charCodeAt(curPos) === 101/*e*/ && source.startsWith('whil', curPos - 4) ||
1396 source.charCodeAt(curPos) === 114/*r*/ && source.startsWith('fo', curPos - 2) ||
1397 source.charCodeAt(curPos - 1) === 105/*i*/ && source.charCodeAt(curPos) === 102/*f*/;
1419 switch (source.charCodeAt(curPos)) {
1421 return source.charCodeAt(curPos - 1) === 61/*=*/;
1426 return source.startsWith('catc', curPos - 4);
1428 return source.startsWith('finall', curPos - 6);
1430 return source.startsWith('els', curPos - 3);