MCPcopy Create free account
hub / github.com/acl-dev/acl / tok822_group

Function tok822_group

lib_acl_cpp/src/mime/internal/tok822_parse.cpp:626–649  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

624/* tok822_group - cluster a group of tokens */
625
626static TOK822 *tok822_group(int group_type, TOK822 *left, TOK822 *right, int sync_type)
627{
628 TOK822 *group;
629 TOK822 *sync;
630 TOK822 *first;
631
632 /*
633 * Cluster the tokens between left and right under their own parse tree
634 * node. Optionally insert a resync token.
635 */
636 if (left != right && (first = left->next) != right) {
637 tok822_cut_before(right);
638 tok822_cut_before(first);
639 group = tok822_alloc(group_type, (char *) 0);
640 tok822_sub_append(group, first);
641 tok822_append(left, group);
642 tok822_append(group, right);
643 if (sync_type) {
644 sync = tok822_alloc(sync_type, (char *) 0);
645 tok822_append(left, sync);
646 }
647 }
648 return (left);
649}
650
651/* tok822_scan_addr - convert external address string to address token */
652

Callers 1

tok822_parse_limitFunction · 0.85

Calls 4

tok822_cut_beforeFunction · 0.85
tok822_allocFunction · 0.85
tok822_sub_appendFunction · 0.85
tok822_appendFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…