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

Function fxSymbolToString

xs/sources/xsSymbol.c:216–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216void fxSymbolToString(txMachine* the, txSlot* slot)
217{
218 txSlot* key = fxGetKey(the, slot->value.symbol);
219 fxStringX(the, slot, "Symbol(");
220 if ((key->kind == XS_KEY_KIND) || (key->kind == XS_KEY_X_KIND))
221 fxConcatString(the, slot, key);
222 else if (key->kind == XS_REFERENCE_KIND) {
223 key = key->value.reference->next->next;
224 if (key->kind != XS_UNDEFINED_KIND)
225 fxConcatString(the, slot, key);
226 }
227 fxConcatStringC(the, slot, ")");
228}
229
230txSlot* fxGetKey(txMachine* the, txID theID)
231{

Callers 2

fx_StringFunction · 0.85

Calls 4

fxGetKeyFunction · 0.85
fxStringXFunction · 0.85
fxConcatStringFunction · 0.85
fxConcatStringCFunction · 0.85

Tested by

no test coverage detected