MCPcopy
hub / github.com/pegjs/pegjs / peg$parseIdentifierStart

Function peg$parseIdentifierStart

lib/parser.js:1903–1951  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1901 }
1902
1903 function peg$parseIdentifierStart() {
1904 var s0, s1, s2;
1905
1906 s0 = peg$parseUnicodeLetter();
1907 if (s0 === peg$FAILED) {
1908 if (input.charCodeAt(peg$currPos) === 36) {
1909 s0 = peg$c14;
1910 peg$currPos++;
1911 } else {
1912 s0 = peg$FAILED;
1913 if (peg$silentFails === 0) { peg$fail(peg$c15); }
1914 }
1915 if (s0 === peg$FAILED) {
1916 if (input.charCodeAt(peg$currPos) === 95) {
1917 s0 = peg$c71;
1918 peg$currPos++;
1919 } else {
1920 s0 = peg$FAILED;
1921 if (peg$silentFails === 0) { peg$fail(peg$c72); }
1922 }
1923 if (s0 === peg$FAILED) {
1924 s0 = peg$currPos;
1925 if (input.charCodeAt(peg$currPos) === 92) {
1926 s1 = peg$c73;
1927 peg$currPos++;
1928 } else {
1929 s1 = peg$FAILED;
1930 if (peg$silentFails === 0) { peg$fail(peg$c74); }
1931 }
1932 if (s1 !== peg$FAILED) {
1933 s2 = peg$parseUnicodeEscapeSequence();
1934 if (s2 !== peg$FAILED) {
1935 peg$savedPos = s0;
1936 s1 = peg$c75(s2);
1937 s0 = s1;
1938 } else {
1939 peg$currPos = s0;
1940 s0 = peg$FAILED;
1941 }
1942 } else {
1943 peg$currPos = s0;
1944 s0 = peg$FAILED;
1945 }
1946 }
1947 }
1948 }
1949
1950 return s0;
1951 }
1952
1953 function peg$parseIdentifierPart() {
1954 var s0;

Callers 2

peg$parseIdentifierNameFunction · 0.85
peg$parseIdentifierPartFunction · 0.85

Calls 4

peg$parseUnicodeLetterFunction · 0.85
peg$failFunction · 0.85
peg$c75Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…