MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxFunctionNodeRename

Function fxFunctionNodeRename

xs/sources/xsScope.c:1141–1161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1139}
1140
1141void fxFunctionNodeRename(void* it, txSymbol* symbol)
1142{
1143 txNode* self = it;
1144 txToken token = self->description->token;
1145 if (token == XS_TOKEN_EXPRESSIONS) {
1146 self = ((txExpressionsNode*)self)->items->first;
1147 if (self->next)
1148 return;
1149 token = self->description->token;
1150 }
1151 if (token == XS_TOKEN_CLASS) {
1152 txClassNode* node = (txClassNode*)self;
1153 if (!node->symbol)
1154 ((txFunctionNode*)(node->constructor))->symbol = symbol;
1155 }
1156 else if ((token == XS_TOKEN_FUNCTION) || (token == XS_TOKEN_GENERATOR) || (token == XS_TOKEN_HOST)) {
1157 txFunctionNode* node = (txFunctionNode*)self;
1158 if (!node->symbol)
1159 node->symbol = symbol;
1160 }
1161}
1162
1163void fxHostNodeBind(void* it, void* param)
1164{

Callers 2

fxAssignNodeBindFunction · 0.85
fxBindingNodeBindFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected