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

Function PiuCodeFormat

modules/piu/PC/Code/piuCode.c:476–490  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

474}
475
476void PiuCodeFormat(PiuCode* self)
477{
478 xsMachine* the = (*self)->the;
479 PiuCodeParserRecord parserRecord;
480 PiuCodeParser parser = &parserRecord;
481 xsTry {
482 PiuCodeParserBegin(self, parser);
483 if ((*self)->type == 1)
484 PiuCodeFormatJS(parser);
485 else if ((*self)->type == 2)
486 PiuCodeFormatJSON(parser);
487 else if ((*self)->type == 3)
488 PiuCodeFormatXML(parser);
489 PiuCodeParserEnd(self, parser);
490 }
491 xsCatch {
492 PiuCodeParserEnd(self, parser);
493 }

Callers 2

PiuCodeDictionaryFunction · 0.85
PiuCode_set_stringFunction · 0.85

Calls 4

PiuCodeFormatJSFunction · 0.85
PiuCodeFormatJSONFunction · 0.85
PiuCodeFormatXMLFunction · 0.85
PiuCodeParserEndFunction · 0.85

Tested by

no test coverage detected