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

Function fxGetMappingValue

xs/tools/xst262.c:581–592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

579static void fxFreeResults(txPool* pool);
580
581yaml_node_t *fxGetMappingValue(yaml_document_t* document, yaml_node_t* mapping, char* name)
582{
583 yaml_node_pair_t* pair = mapping->data.mapping.pairs.start;
584 while (pair < mapping->data.mapping.pairs.top) {
585 yaml_node_t* key = yaml_document_get_node(document, pair->key);
586 if (!strcmp((char*)key->data.scalar.value, name)) {
587 return yaml_document_get_node(document, pair->value);
588 }
589 pair++;
590 }
591 return NULL;
592}
593
594txFeature* fxNewFeature(char* name)
595{

Callers 1

fxRunContextFunction · 0.70

Calls 1

yaml_document_get_nodeFunction · 0.85

Tested by

no test coverage detected