MCPcopy Create free account
hub / github.com/codemix/graph / peg$parseOctalInteger

Function peg$parseOctalInteger

packages/graph/src/grammar.js:16891–16960  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16889 }
16890
16891 function peg$parseOctalInteger() {
16892 let s0, s1, s2, s3, s4, s5;
16893
16894 s0 = peg$currPos;
16895 if (input.charCodeAt(peg$currPos) === 45) {
16896 s1 = peg$c23;
16897 peg$currPos++;
16898 } else {
16899 s1 = peg$FAILED;
16900 if (peg$silentFails === 0) { peg$fail(peg$e25); }
16901 }
16902 if (s1 === peg$FAILED) {
16903 s1 = null;
16904 }
16905 if (input.charCodeAt(peg$currPos) === 48) {
16906 s2 = peg$c109;
16907 peg$currPos++;
16908 } else {
16909 s2 = peg$FAILED;
16910 if (peg$silentFails === 0) { peg$fail(peg$e117); }
16911 }
16912 if (s2 !== peg$FAILED) {
16913 s3 = input.charAt(peg$currPos);
16914 if (peg$r9.test(s3)) {
16915 peg$currPos++;
16916 } else {
16917 s3 = peg$FAILED;
16918 if (peg$silentFails === 0) { peg$fail(peg$e120); }
16919 }
16920 if (s3 !== peg$FAILED) {
16921 s4 = [];
16922 s5 = input.charAt(peg$currPos);
16923 if (peg$r10.test(s5)) {
16924 peg$currPos++;
16925 } else {
16926 s5 = peg$FAILED;
16927 if (peg$silentFails === 0) { peg$fail(peg$e121); }
16928 }
16929 if (s5 !== peg$FAILED) {
16930 while (s5 !== peg$FAILED) {
16931 s4.push(s5);
16932 s5 = input.charAt(peg$currPos);
16933 if (peg$r10.test(s5)) {
16934 peg$currPos++;
16935 } else {
16936 s5 = peg$FAILED;
16937 if (peg$silentFails === 0) { peg$fail(peg$e121); }
16938 }
16939 }
16940 } else {
16941 s4 = peg$FAILED;
16942 }
16943 if (s4 !== peg$FAILED) {
16944 peg$savedPos = s0;
16945 s0 = peg$f277(s1, s4);
16946 } else {
16947 peg$currPos = s0;
16948 s0 = peg$FAILED;

Callers 1

peg$parseNumberLiteralFunction · 0.85

Calls 3

peg$failFunction · 0.85
peg$f277Function · 0.85
pushMethod · 0.45

Tested by

no test coverage detected