MCPcopy Index your code
hub / github.com/react/react / parseBinary

Function parseBinary

scripts/babel/transform-test-gate-pragma.js:168–189  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

166 }
167
168 function parseBinary() {
169 let left = parseUnary();
170 while (true) {
171 const token = tokens[i];
172 if (token !== undefined) {
173 switch (token.type) {
174 case '==':
175 case '!=': {
176 i++;
177 const right = parseUnary();
178 if (right === null) {
179 throw Error('Missing expression after ' + token.type);
180 }
181 left = t.binaryExpression(token.type, left, right);
182 continue;
183 }
184 }
185 }
186 break;
187 }
188 return left;
189 }
190
191 function parseUnary() {
192 const token = tokens[i];

Callers 1

parseExpressionFunction · 0.85

Calls 1

parseUnaryFunction · 0.85

Tested by

no test coverage detected