MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / atdocument

Function atdocument

packages/core/css/lib/parse/index.ts:441–461  ·  view source on GitHub ↗

* Parse document.

()

Source from the content-addressed store, hash-verified

439 */
440
441 function atdocument() {
442 var pos = position();
443 var m = match(/^@([-\w]+)?document *([^{]+)/);
444 if (!m) return;
445
446 var vendor = trim(m[1]);
447 var doc = trim(m[2]);
448
449 if (!open()) return error("@document missing '{'");
450
451 var style = comments().concat(rules());
452
453 if (!close()) return error("@document missing '}'");
454
455 return pos({
456 type: 'document',
457 document: doc,
458 vendor: vendor,
459 rules: style,
460 });
461 }
462
463 /**
464 * Parse font-face.

Callers 1

atruleFunction · 0.85

Calls 9

trimFunction · 0.85
openFunction · 0.85
commentsFunction · 0.85
rulesFunction · 0.85
closeFunction · 0.85
concatMethod · 0.80
positionFunction · 0.70
matchFunction · 0.70
errorFunction · 0.70

Tested by

no test coverage detected