(type)
| 40 | }; |
| 41 | |
| 42 | const shallow = (type) => (match, _, position) => { |
| 43 | const [result, content] = match; |
| 44 | |
| 45 | return [ |
| 46 | { |
| 47 | type, |
| 48 | value: content, |
| 49 | source: result, |
| 50 | }, |
| 51 | position + result.length, |
| 52 | ]; |
| 53 | }; |
| 54 | |
| 55 | const root = (input, children) => ({ |
| 56 | type: 'root', |