(type, callback)
| 27 | }; |
| 28 | |
| 29 | const deep = (type, callback) => (match, _, position) => { |
| 30 | const [result, content] = match; |
| 31 | |
| 32 | return [ |
| 33 | { |
| 34 | type, |
| 35 | children: callback(content), |
| 36 | source: result, |
| 37 | }, |
| 38 | position + result.length, |
| 39 | ]; |
| 40 | }; |
| 41 | |
| 42 | const shallow = (type) => (match, _, position) => { |
| 43 | const [result, content] = match; |
nothing calls this directly
no test coverage detected