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

Function fxScopeAddDeclareNode

xs/sources/xsScope.c:157–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157void fxScopeAddDeclareNode(txScope* self, txDeclareNode* node)
158{
159 self->declareNodeCount++;
160 if (self->token == XS_TOKEN_EVAL) {
161 if (self->lastDeclareNode)
162 node->nextDeclareNode = self->firstDeclareNode;
163 else
164 self->lastDeclareNode = node;
165 self->firstDeclareNode = node;
166 }
167 else {
168 if (self->lastDeclareNode)
169 self->lastDeclareNode->nextDeclareNode = node;
170 else
171 self->firstDeclareNode = node;
172 self->lastDeclareNode = node;
173 }
174 if (node->description->token == XS_TOKEN_USING) {
175 txDeclareNode* node = fxDeclareNodeNew(self->parser, XS_TOKEN_CONST, C_NULL);
176 node->flags |= mxDeclareNodeDisposableFlag;
177 fxScopeAddDeclareNode(self, node);
178 self->disposableNodeCount++;
179 }
180}
181
182void fxScopeAddDefineNode(txScope* self, txDefineNode* node)
183{

Callers 8

fxScopeLookupFunction · 0.85
fxClassNodeHoistFunction · 0.85
fxDeclareNodeHoistFunction · 0.85
fxDefineNodeHoistFunction · 0.85
fxExportNodeHoistFunction · 0.85
fxFunctionNodeHoistFunction · 0.85
fxHostNodeHoistFunction · 0.85
fxImportNodeHoistFunction · 0.85

Calls 1

fxDeclareNodeNewFunction · 0.85

Tested by

no test coverage detected