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

Method register

packages/language-python/src/nodes/literals.ts:230–246  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

228 }
229
230 static register() {
231 const typeRegistration = new TypeRegistration()
232 typeRegistration.typeName = PYTHON_BOOL
233 typeRegistration.deserializer = PythonBool.deserializer
234 typeRegistration.properties = ['value']
235 typeRegistration.layout = new NodeLayout(HighlightColorCategory.KEYWORD, [
236 new LayoutComponent(LayoutComponentType.PROPERTY, 'value'),
237 ])
238 typeRegistration.pasteAdapters[PYTHON_EXPRESSION] = (node: SplootNode) => {
239 const exp = new PythonExpression(null)
240 exp.getTokenSet().addChild(node)
241 return exp
242 }
243 registerType(typeRegistration)
244 registerNodeCateogry(PYTHON_BOOL, NodeCategory.PythonExpressionToken)
245 registerAutocompleter(NodeCategory.PythonExpressionToken, new PythonBoolGenerator())
246 }
247}

Callers 1

loadPythonTypesFunction · 0.45

Calls 5

getTokenSetMethod · 0.95
registerTypeFunction · 0.90
registerNodeCateogryFunction · 0.90
registerAutocompleterFunction · 0.90
addChildMethod · 0.80

Tested by

no test coverage detected