MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / CallExpression

Function CallExpression

packages/main/src/babel/babel.ts:191–227  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

189 },
190
191 CallExpression(path) {
192 if (!FileWithImports) return
193
194 const target = getTarget(path.node.callee, Sources, SOURCE_TYPES.effect)
195 if (!target) return
196
197 let name: string | undefined
198
199 let parent = path.parentPath
200 for (let i = 0; i < 5; i++) {
201
202 if (parent.node.type === 'CallExpression' &&
203 parent.node.callee.type === 'Identifier'
204 ) {
205 name = `to_${parent.node.callee.name}`
206 break
207 }
208
209 if ((parent.node.type === 'FunctionDeclaration' ||
210 parent.node.type === 'VariableDeclarator') &&
211 parent.node.id?.type === 'Identifier'
212 ) {
213 name = `in_${parent.node.id.name}`
214 break
215 }
216
217 if (parent.parentPath) {
218 parent = parent.parentPath
219 } else {
220 break
221 }
222 }
223
224 if (name) {
225 addNameToOptions(path.node, 2, name)
226 }
227 },
228 },
229}
230

Callers

nothing calls this directly

Calls 2

getTargetFunction · 0.85
addNameToOptionsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…