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

Function peg$parsePrimaryExpression

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

Source from the content-addressed store, hash-verified

9866 }
9867
9868 function peg$parsePrimaryExpression() {
9869 let s0, s1, s2, s3, s4, s5;
9870
9871 s0 = peg$currPos;
9872 if (input.charCodeAt(peg$currPos) === 40) {
9873 s1 = peg$c4;
9874 peg$currPos++;
9875 } else {
9876 s1 = peg$FAILED;
9877 if (peg$silentFails === 0) { peg$fail(peg$e4); }
9878 }
9879 if (s1 !== peg$FAILED) {
9880 s2 = peg$parse_();
9881 s3 = peg$parseBooleanOrExpression();
9882 if (s3 !== peg$FAILED) {
9883 s4 = peg$parse_();
9884 if (input.charCodeAt(peg$currPos) === 41) {
9885 s5 = peg$c5;
9886 peg$currPos++;
9887 } else {
9888 s5 = peg$FAILED;
9889 if (peg$silentFails === 0) { peg$fail(peg$e5); }
9890 }
9891 if (s5 !== peg$FAILED) {
9892 peg$savedPos = s0;
9893 s0 = peg$f179(s3);
9894 } else {
9895 peg$currPos = s0;
9896 s0 = peg$FAILED;
9897 }
9898 } else {
9899 peg$currPos = s0;
9900 s0 = peg$FAILED;
9901 }
9902 } else {
9903 peg$currPos = s0;
9904 s0 = peg$FAILED;
9905 }
9906 if (s0 === peg$FAILED) {
9907 s0 = peg$parseReduceExpression();
9908 if (s0 === peg$FAILED) {
9909 s0 = peg$parseQuantifierExpression();
9910 if (s0 === peg$FAILED) {
9911 s0 = peg$parseCaseExpression();
9912 if (s0 === peg$FAILED) {
9913 s0 = peg$parseFunctionCallExpression();
9914 if (s0 === peg$FAILED) {
9915 s0 = peg$parseListLiteralExpr();
9916 if (s0 === peg$FAILED) {
9917 s0 = peg$parseMapLiteralExpr();
9918 if (s0 === peg$FAILED) {
9919 s0 = peg$parseLiteral();
9920 if (s0 === peg$FAILED) {
9921 s0 = peg$parseParameterRef();
9922 if (s0 === peg$FAILED) {
9923 s0 = peg$parseMapProjection();
9924 if (s0 === peg$FAILED) {
9925 s0 = peg$currPos;

Callers 1

Calls 15

peg$failFunction · 0.85
peg$parse_Function · 0.85
peg$f179Function · 0.85
peg$parseCaseExpressionFunction · 0.85
peg$parseListLiteralExprFunction · 0.85
peg$parseMapLiteralExprFunction · 0.85
peg$parseLiteralFunction · 0.85
peg$parseParameterRefFunction · 0.85

Tested by

no test coverage detected