MCPcopy Create free account
hub / github.com/RubyLouvre/anu / parseDisjunction

Function parseDisjunction

test/babel.js:58139–58156  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

58137 }
58138
58139 function parseDisjunction() {
58140 // Disjunction ::
58141 // Alternative
58142 // Alternative | Disjunction
58143 var res = [],
58144 from = pos;
58145 res.push(parseAlternative());
58146
58147 while (match('|')) {
58148 res.push(parseAlternative());
58149 }
58150
58151 if (res.length === 1) {
58152 return res[0];
58153 }
58154
58155 return createDisjunction(res, from, pos);
58156 }
58157
58158 function parseAlternative() {
58159 var res = [],

Callers 2

parseGroupFunction · 0.85
parseFunction · 0.85

Calls 3

parseAlternativeFunction · 0.85
createDisjunctionFunction · 0.85
matchFunction · 0.70

Tested by

no test coverage detected