MCPcopy Index your code
hub / github.com/pegjs/pegjs / peg$parseUnicodeEscapeSequence

Function peg$parseUnicodeEscapeSequence

lib/parser.js:2966–3025  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2964 }
2965
2966 function peg$parseUnicodeEscapeSequence() {
2967 var s0, s1, s2, s3, s4, s5, s6, s7;
2968
2969 s0 = peg$currPos;
2970 if (input.charCodeAt(peg$currPos) === 117) {
2971 s1 = peg$c126;
2972 peg$currPos++;
2973 } else {
2974 s1 = peg$FAILED;
2975 if (peg$silentFails === 0) { peg$fail(peg$c127); }
2976 }
2977 if (s1 !== peg$FAILED) {
2978 s2 = peg$currPos;
2979 s3 = peg$currPos;
2980 s4 = peg$parseHexDigit();
2981 if (s4 !== peg$FAILED) {
2982 s5 = peg$parseHexDigit();
2983 if (s5 !== peg$FAILED) {
2984 s6 = peg$parseHexDigit();
2985 if (s6 !== peg$FAILED) {
2986 s7 = peg$parseHexDigit();
2987 if (s7 !== peg$FAILED) {
2988 s4 = [s4, s5, s6, s7];
2989 s3 = s4;
2990 } else {
2991 peg$currPos = s3;
2992 s3 = peg$FAILED;
2993 }
2994 } else {
2995 peg$currPos = s3;
2996 s3 = peg$FAILED;
2997 }
2998 } else {
2999 peg$currPos = s3;
3000 s3 = peg$FAILED;
3001 }
3002 } else {
3003 peg$currPos = s3;
3004 s3 = peg$FAILED;
3005 }
3006 if (s3 !== peg$FAILED) {
3007 s2 = input.substring(s2, peg$currPos);
3008 } else {
3009 s2 = s3;
3010 }
3011 if (s2 !== peg$FAILED) {
3012 peg$savedPos = s0;
3013 s1 = peg$c128(s2);
3014 s0 = s1;
3015 } else {
3016 peg$currPos = s0;
3017 s0 = peg$FAILED;
3018 }
3019 } else {
3020 peg$currPos = s0;
3021 s0 = peg$FAILED;
3022 }
3023

Callers 2

peg$parseIdentifierStartFunction · 0.85
peg$parseEscapeSequenceFunction · 0.85

Calls 3

peg$failFunction · 0.85
peg$parseHexDigitFunction · 0.85
peg$c128Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…