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

Function peg$parsePrimaryExpression

lib/parser.js:1182–1248  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1180 }
1181
1182 function peg$parsePrimaryExpression() {
1183 var s0, s1, s2, s3, s4, s5;
1184
1185 s0 = peg$parseLiteralMatcher();
1186 if (s0 === peg$FAILED) {
1187 s0 = peg$parseCharacterClassMatcher();
1188 if (s0 === peg$FAILED) {
1189 s0 = peg$parseAnyMatcher();
1190 if (s0 === peg$FAILED) {
1191 s0 = peg$parseRuleReferenceExpression();
1192 if (s0 === peg$FAILED) {
1193 s0 = peg$parseSemanticPredicateExpression();
1194 if (s0 === peg$FAILED) {
1195 s0 = peg$currPos;
1196 if (input.charCodeAt(peg$currPos) === 40) {
1197 s1 = peg$c27;
1198 peg$currPos++;
1199 } else {
1200 s1 = peg$FAILED;
1201 if (peg$silentFails === 0) { peg$fail(peg$c28); }
1202 }
1203 if (s1 !== peg$FAILED) {
1204 s2 = peg$parse__();
1205 if (s2 !== peg$FAILED) {
1206 s3 = peg$parseChoiceExpression();
1207 if (s3 !== peg$FAILED) {
1208 s4 = peg$parse__();
1209 if (s4 !== peg$FAILED) {
1210 if (input.charCodeAt(peg$currPos) === 41) {
1211 s5 = peg$c29;
1212 peg$currPos++;
1213 } else {
1214 s5 = peg$FAILED;
1215 if (peg$silentFails === 0) { peg$fail(peg$c30); }
1216 }
1217 if (s5 !== peg$FAILED) {
1218 peg$savedPos = s0;
1219 s1 = peg$c31(s3);
1220 s0 = s1;
1221 } else {
1222 peg$currPos = s0;
1223 s0 = peg$FAILED;
1224 }
1225 } else {
1226 peg$currPos = s0;
1227 s0 = peg$FAILED;
1228 }
1229 } else {
1230 peg$currPos = s0;
1231 s0 = peg$FAILED;
1232 }
1233 } else {
1234 peg$currPos = s0;
1235 s0 = peg$FAILED;
1236 }
1237 } else {
1238 peg$currPos = s0;
1239 s0 = peg$FAILED;

Callers 1

Calls 9

peg$parseLiteralMatcherFunction · 0.85
peg$parseAnyMatcherFunction · 0.85
peg$failFunction · 0.85
peg$parse__Function · 0.85
peg$c31Function · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…