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

Function peg$parseSingleLineComment

lib/parser.js:1758–1835  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1756 }
1757
1758 function peg$parseSingleLineComment() {
1759 var s0, s1, s2, s3, s4, s5;
1760
1761 s0 = peg$currPos;
1762 if (input.substr(peg$currPos, 2) === peg$c66) {
1763 s1 = peg$c66;
1764 peg$currPos += 2;
1765 } else {
1766 s1 = peg$FAILED;
1767 if (peg$silentFails === 0) { peg$fail(peg$c67); }
1768 }
1769 if (s1 !== peg$FAILED) {
1770 s2 = [];
1771 s3 = peg$currPos;
1772 s4 = peg$currPos;
1773 peg$silentFails++;
1774 s5 = peg$parseLineTerminator();
1775 peg$silentFails--;
1776 if (s5 === peg$FAILED) {
1777 s4 = void 0;
1778 } else {
1779 peg$currPos = s4;
1780 s4 = peg$FAILED;
1781 }
1782 if (s4 !== peg$FAILED) {
1783 s5 = peg$parseSourceCharacter();
1784 if (s5 !== peg$FAILED) {
1785 s4 = [s4, s5];
1786 s3 = s4;
1787 } else {
1788 peg$currPos = s3;
1789 s3 = peg$FAILED;
1790 }
1791 } else {
1792 peg$currPos = s3;
1793 s3 = peg$FAILED;
1794 }
1795 while (s3 !== peg$FAILED) {
1796 s2.push(s3);
1797 s3 = peg$currPos;
1798 s4 = peg$currPos;
1799 peg$silentFails++;
1800 s5 = peg$parseLineTerminator();
1801 peg$silentFails--;
1802 if (s5 === peg$FAILED) {
1803 s4 = void 0;
1804 } else {
1805 peg$currPos = s4;
1806 s4 = peg$FAILED;
1807 }
1808 if (s4 !== peg$FAILED) {
1809 s5 = peg$parseSourceCharacter();
1810 if (s5 !== peg$FAILED) {
1811 s4 = [s4, s5];
1812 s3 = s4;
1813 } else {
1814 peg$currPos = s3;
1815 s3 = peg$FAILED;

Callers 2

peg$parseCommentFunction · 0.85
peg$parseEOSFunction · 0.85

Calls 3

peg$failFunction · 0.85
peg$parseLineTerminatorFunction · 0.85
peg$parseSourceCharacterFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…