MCPcopy
hub / github.com/mobxjs/mobx / skipComment

Function skipComment

docs/assets/getting-started-assets/javascripts/JSXTransformer.js:3257–3291  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3255 }
3256
3257 function skipComment() {
3258 var ch
3259
3260 while (index < length) {
3261 ch = source.charCodeAt(index)
3262
3263 if (isWhiteSpace(ch)) {
3264 ++index
3265 } else if (isLineTerminator(ch)) {
3266 ++index
3267 if (ch === 13 && source.charCodeAt(index) === 10) {
3268 ++index
3269 }
3270 ++lineNumber
3271 lineStart = index
3272 } else if (ch === 47) {
3273 // 47 is '/'
3274 ch = source.charCodeAt(index + 1)
3275 if (ch === 47) {
3276 ++index
3277 ++index
3278 skipSingleLineComment()
3279 } else if (ch === 42) {
3280 // 42 is '*'
3281 ++index
3282 ++index
3283 skipMultiLineComment()
3284 } else {
3285 break
3286 }
3287 } else {
3288 break
3289 }
3290 }
3291 }
3292
3293 function scanHexEscape(prefix) {
3294 var i,

Callers 8

scanTemplateElementFunction · 0.85
scanRegExpFunction · 0.85
advanceFunction · 0.85
markerCreateFunction · 0.85
peekLineTerminatorFunction · 0.85
consumeSemicolonFunction · 0.85
collectTokenFunction · 0.85
collectRegexFunction · 0.85

Calls 4

isWhiteSpaceFunction · 0.85
isLineTerminatorFunction · 0.85
skipSingleLineCommentFunction · 0.85
skipMultiLineCommentFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…