MCPcopy Index your code
hub / github.com/reactjs/react-rails / skipComment

Function skipComment

lib/assets/javascripts/JSXTransformer.js:2897–2929  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2895 }
2896
2897 function skipComment() {
2898 var ch;
2899
2900 while (index < length) {
2901 ch = source.charCodeAt(index);
2902
2903 if (isWhiteSpace(ch)) {
2904 ++index;
2905 } else if (isLineTerminator(ch)) {
2906 ++index;
2907 if (ch === 13 && source.charCodeAt(index) === 10) {
2908 ++index;
2909 }
2910 ++lineNumber;
2911 lineStart = index;
2912 } else if (ch === 47) { // 47 is '/'
2913 ch = source.charCodeAt(index + 1);
2914 if (ch === 47) {
2915 ++index;
2916 ++index;
2917 skipSingleLineComment();
2918 } else if (ch === 42) { // 42 is '*'
2919 ++index;
2920 ++index;
2921 skipMultiLineComment();
2922 } else {
2923 break;
2924 }
2925 } else {
2926 break;
2927 }
2928 }
2929 }
2930
2931 function scanHexEscape(prefix) {
2932 var i, len, ch, code = 0;

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