()
| 30 | } |
| 31 | |
| 32 | function* MathExpression(): ParseGenerator { |
| 33 | yield whitespaceMay; |
| 34 | let current: number = yield ParseInt; |
| 35 | |
| 36 | while (yield hasMore) { |
| 37 | yield whitespaceMay; |
| 38 | const operator: Operator = yield ParseOperator; |
| 39 | yield whitespaceMay; |
| 40 | const other = yield ParseInt; |
| 41 | |
| 42 | current = applyOperator(current, other, operator); |
| 43 | } |
| 44 | |
| 45 | return current; |
| 46 | } |
| 47 | |
| 48 | test.each([ |
| 49 | ['1 + 1', 2], |
no test coverage detected