Skip to content

add: runtime values through CPC_CTX - #9

Merged
steve-chavez merged 1 commit into
masterfrom
runtime
Jul 19, 2026
Merged

add: runtime values through CPC_CTX#9
steve-chavez merged 1 commit into
masterfrom
runtime

Conversation

@steve-chavez

@steve-chavez steve-chavez commented Jul 19, 2026

Copy link
Copy Markdown
Member

Problem

Currently both the parsers and values are defined statically. The parsers do need this but the values don't.

This hurts reusability, for example when trying to use CPC_TAKE_QUOTED with different quote or escape characters.

Solution

Allow defining runtime values by reusing the CpcArena user field.

This way runtime value can be specified by:

...
CPC_TAKE_QUOTED(p_span_ctx_bsquoted, CPC_CTX(QuotedCtx, quote), CPC_CTX(QuotedCtx, escape))

Problem
-------

Currently both the parsers and values are defined statically. The
parsers do need this but the values don't.

This hurts reusability, for example when trying to use
CPC_TAKE_QUOTED with different quote or escape characters.

Solution
--------

Allow defining runtime values by reusing the `CpcArena` user field.

This way runtime value can be specified by:

CPC_TAKE_QUOTED(p_span_ctx_bsquoted, CPC_CTX(QuotedCtx, quote), CPC_CTX(QuotedCtx, escape))
@steve-chavez steve-chavez changed the title add: runtime values through CPC_USER add: runtime values through CPC_CTX Jul 19, 2026
@steve-chavez
steve-chavez marked this pull request as ready for review July 19, 2026 21:48
@steve-chavez
steve-chavez merged commit f9572b7 into master Jul 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant