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

Function fxPrintID

xs/tools/xslSlot.c:964–985  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

962}
963
964void fxPrintID(txMachine* the, FILE* file, txID id)
965{
966 txLinker* linker = (txLinker*)(the->context);
967 if (id == XS_NO_ID)
968 fprintf(file, "XS_NO_ID");
969 else {
970 txLinkerSymbol* linkerSymbol = linker->symbolArray[id];
971 if (linkerSymbol) {
972 if (fxIsCIdentifier(linker, linkerSymbol->string))
973 fprintf(file, "xsID_%s", linkerSymbol->string);
974 else
975 fprintf(file, "%d /* %s */", id, linkerSymbol->string);
976 }
977 else {
978 char* string = fxGetKeyName(the, id);
979 if (string)
980 fprintf(file, "%d /* %s */", id, string);
981 else
982 fprintf(file, "%d /* ? */", id);
983 }
984 }
985}
986
987void fxPrintNumber(txMachine* the, FILE* file, txNumber value)
988{

Callers 2

fxPrintBuildersFunction · 0.70
fxPrintSlotFunction · 0.70

Calls 2

fxGetKeyNameFunction · 0.85
fxIsCIdentifierFunction · 0.70

Tested by

no test coverage detected