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

Function atkeyframes

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

* Parse keyframes.

()

Source from the content-addressed store, hash-verified

288 */
289
290 function atkeyframes() {
291 var pos = position();
292 var m = match(/^@([-\w]+)?keyframes\s*/);
293
294 if (!m) return;
295 var vendor = m[1];
296
297 // identifier
298 var m = match(/^([-\w]+)\s*/);
299 if (!m) return error('@keyframes missing name');
300 var name = m[1];
301
302 if (!open()) return error("@keyframes missing '{'");
303
304 var frame;
305 var frames = comments();
306 while ((frame = keyframe())) {
307 frames.push(frame);
308 frames = frames.concat(comments());
309 }
310
311 if (!close()) return error("@keyframes missing '}'");
312
313 return pos({
314 type: 'keyframes',
315 name: name,
316 vendor: vendor,
317 keyframes: frames,
318 });
319 }
320
321 /**
322 * Parse supports.

Callers 1

atruleFunction · 0.85

Calls 9

openFunction · 0.85
commentsFunction · 0.85
keyframeFunction · 0.85
closeFunction · 0.85
concatMethod · 0.80
positionFunction · 0.70
matchFunction · 0.70
errorFunction · 0.70
pushMethod · 0.45

Tested by

no test coverage detected