MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / deep

Function deep

packages/ast/parse/combinators.js:29–40  ·  view source on GitHub ↗
(type, callback)

Source from the content-addressed store, hash-verified

27};
28
29const 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
42const shallow = (type) => (match, _, position) => {
43 const [result, content] = match;

Callers

nothing calls this directly

Calls 1

callbackFunction · 0.50

Tested by

no test coverage detected