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

Method register

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

Source from the content-addressed store, hash-verified

169 }
170
171 static register() {
172 const typeRegistration = new TypeRegistration()
173 typeRegistration.typeName = PYTHON_NONE
174 typeRegistration.deserializer = NoneLiteral.deserializer
175 typeRegistration.properties = []
176 typeRegistration.layout = new NodeLayout(HighlightColorCategory.KEYWORD, [
177 new LayoutComponent(LayoutComponentType.KEYWORD, 'None'),
178 ])
179 typeRegistration.pasteAdapters[PYTHON_EXPRESSION] = (node: SplootNode) => {
180 const exp = new PythonExpression(null)
181 exp.getTokenSet().addChild(node)
182 return exp
183 }
184 registerType(typeRegistration)
185 registerNodeCateogry(PYTHON_NONE, NodeCategory.PythonExpressionToken)
186 registerAutocompleter(NodeCategory.PythonExpressionToken, new PythonNoneGenerator())
187 }
188}
189
190class PythonBoolGenerator implements SuggestionGenerator {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected