MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / csx_element_end

Function csx_element_end

internal/cbm/doclink_cs.c:3644–3665  ·  view source on GitHub ↗

An end tag: `depth` is already the depth outside the element. */

Source from the content-addressed store, hash-verified

3642
3643/* An end tag: `depth` is already the depth outside the element. */
3644static void csx_element_end(csx_scan_t *p) {
3645 if (p->depth == PAIR_LEN && p->prop_open) {
3646 csx_put_property(p);
3647 p->prop_open = false;
3648 } else if (p->depth == PAIR_LEN && p->using_open) {
3649 if (p->using_complex) {
3650 sb_puts(&p->out, "Y\n");
3651 } else {
3652 csx_put_using(p, &p->pending);
3653 }
3654 p->using_open = false;
3655 }
3656 if (p->depth == SKIP_ONE) {
3657 if (p->group == 'i' && p->i_written) {
3658 sb_puts(&p->out, "E\n");
3659 }
3660 p->group = 0;
3661 }
3662 if (p->group == 'c' && p->choose_props == p->depth + SKIP_ONE) {
3663 p->choose_props = CBM_NOT_FOUND;
3664 }
3665}
3666
3667static bool csx_ci_suffix(const char *s, const char *sfx) {
3668 size_t n = s ? strlen(s) : 0;

Callers 1

Calls 3

csx_put_propertyFunction · 0.85
sb_putsFunction · 0.85
csx_put_usingFunction · 0.85

Tested by

no test coverage detected