Dextrin.Text.Actions (Dextrin v0.1.0)

Copy Markdown View Source

Ichor.Actions implementation for Dextrin.Text.Grammar โ€” turns the raw capture tree Grammar.Native produces while matching priv/grammar/dxn.aether into actual Dextrin.Value.t() values. context is a Dextrin.Registry.t() โ€” text parsing only ever reads it (to resolve struct schemas and custom tags), never mutates it.

handle_token/3 covers every scalar (numbers via String.to_integer/Float.parse/Decimal.new/a manual rational split; strings/chars through the shared escape-decoding in Dextrin.Text.Escapes so string bodies and char literals never duplicate escape logic); handle_rule/3 covers every collection and tag_form (a dispatch table: built-in tag names from DXN.md ยง1.3 go to a hardcoded handler in dispatch_tag/3, anything else falls through to a Dextrin.Registry lookup, then to Dextrin.CustomTag as the last resort).