Cooper.RefCommon (Cooper v0.3.0)

Copy Markdown View Source

Shared across Cooper.Actions and Cooper.InterpActions: the :ref_suffix (:default/:+alt/:?"msg", CASC.md §7.2's "one rule, not three near-identical ones", reused across @{}/${}/%{} in both grammars), :env_bracket (${NAME[i]} vs ${NAME[]}) and :filters (| trim, | trim_suffix: "://", CASC.md §7.2) handling, plus the small eval helpers every custom handle_rule in either module needs.

Filters live here rather than in either action module specifically so the two cannot drift: Cooper.Actions reaches them through the casc.aether grammar and Cooper.InterpActions by hand-parsing a raw token, but both end up in apply_filters/2.