MCPcopy Create free account
hub / github.com/SplootCode/splootcode / constructor

Function constructor

packages/language-python/src/nodes/python_node.ts:15–22  ·  view source on GitHub ↗
(parent: ParentReference, type: string)

Source from the content-addressed store, hash-verified

13 isPythonNode: true
14
15 constructor(parent: ParentReference, type: string) {
16 super(parent, type)
17 this.isPythonNode = true
18 if (parent?.node && !isPythonNode(parent.node)) {
19 throw new Error(`Node ${type} must be a child of a PythonNode.`)
20 }
21 this.scope = null
22 }
23
24 getScope(skipSelf = false): PythonScope {
25 if (!skipSelf && isScopedNodeType(this.type)) {

Callers

nothing calls this directly

Calls 1

isPythonNodeFunction · 0.85

Tested by

no test coverage detected