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

Function fxHoisterAddExportLink

xs/sources/xsScope.c:114–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void fxHoisterAddExportLink(txHoister* self, txSpecifierNode* specifier)
115{
116 txExportLink* link = self->firstExportLink;
117 txSymbol* symbol = specifier->asSymbol ? specifier->asSymbol : specifier->symbol;
118 if (symbol) {
119 while (link) {
120 if (link->symbol == symbol) {
121 fxReportParserError(self->parser, specifier->line, "duplicate export %s", symbol->string);
122 return;
123 }
124 link = link->next;
125 }
126 link = fxNewParserChunk(self->parser, sizeof(txExportLink));
127 link->next = self->firstExportLink;
128 link->symbol = symbol;
129 self->firstExportLink = link;
130 }
131}
132
133void fxBinderPopVariables(txBinder* self, txInteger count)
134{

Callers 1

fxExportNodeHoistFunction · 0.85

Calls 2

fxReportParserErrorFunction · 0.85
fxNewParserChunkFunction · 0.85

Tested by

no test coverage detected