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

Function comment

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

* Parse comment.

()

Source from the content-addressed store, hash-verified

164 */
165
166 function comment() {
167 var pos = position();
168 if ('/' != css.charAt(0) || '*' != css.charAt(1)) return;
169
170 var i = 2;
171 while ('' != css.charAt(i) && ('*' != css.charAt(i) || '/' != css.charAt(i + 1))) ++i;
172 i += 2;
173
174 if ('' === css.charAt(i - 1)) {
175 return error('End of comment missing');
176 }
177
178 var str = css.slice(2, i - 2);
179 column += 2;
180 updatePosition(str);
181 css = css.slice(i);
182 column += 2;
183
184 return pos({
185 type: 'comment',
186 comment: str,
187 });
188 }
189
190 /**
191 * Parse selector.

Callers 1

commentsFunction · 0.85

Calls 4

updatePositionFunction · 0.85
positionFunction · 0.70
errorFunction · 0.70
sliceMethod · 0.45

Tested by

no test coverage detected