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

Function fxReadResult

xs/tools/xst262.c:830–867  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

828}
829
830txResult* fxReadResult(yaml_parser_t* parser, char* path)
831{
832 txResult* result = NULL;
833 txResult** address;
834 yaml_event_t _event;
835 yaml_event_t* event = &_event;
836 yaml_parser_parse(parser, event);
837 if (event->type == YAML_SEQUENCE_START_EVENT) {
838 result = fxNewResult(path, NULL);
839 address = &(result->first);
840 yaml_event_delete(event);
841 yaml_parser_parse(parser, event);
842 while (event->type != YAML_SEQUENCE_END_EVENT) {
843 txResult* child;
844 fxCheckEvent(event, YAML_MAPPING_START_EVENT, NULL);
845 yaml_event_delete(event);
846 yaml_parser_parse(parser, event);
847 fxCheckEvent(event, YAML_SCALAR_EVENT, NULL);
848 *address = child = fxReadResult(parser, (char*)event->data.scalar.value);
849 child->parent = result;
850 address = &(child->next);
851 yaml_event_delete(event);
852 yaml_parser_parse(parser, event);
853 fxCheckEvent(event, YAML_MAPPING_END_EVENT, NULL);
854 yaml_event_delete(event);
855 yaml_parser_parse(parser, event);
856 }
857 }
858 else {
859 fxCheckEvent(event, YAML_SCALAR_EVENT, NULL);
860 if (event->data.scalar.length > 0)
861 result = fxNewResult(path, (char*)event->data.scalar.value);
862 else
863 result = fxNewResult(path, NULL);
864 }
865 yaml_event_delete(event);
866 return result;
867}
868
869void fxRunDirectory(txPool* pool, char* path)
870{

Callers 1

fxReadConfigurationFunction · 0.85

Calls 4

yaml_parser_parseFunction · 0.85
fxNewResultFunction · 0.85
yaml_event_deleteFunction · 0.85
fxCheckEventFunction · 0.85

Tested by

no test coverage detected