Skip to content

feat: kwargs directives through ISC — title_case word_separator, separate separator - #776

Merged
ronaldtse merged 1 commit into
mainfrom
feat/kwargs-directives
Sep 29, 2026
Merged

ronaldtse merged 1 commit into
mainfrom
feat/kwargs-directives

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

Companion to interscript/interscript-py#7 (merge that first — CI clones interscript-python main).

What

  • Grammar: title_case accepts an optional word_separator: "…" kwarg (kwarg-list capture after the directive).
  • DocumentBuilder/NodeAdapter: kwargs flow through string_case items into the Funcall.
  • Isc::Generator: emits separate / separate separator "…" / title_case / title_case word_separator: "…".
  • Adapter fix: separate was emulated as a space→separator substitution — which cannot produce the real semantics (こんいちは → こ|ん|い|ち|は, space-free input silently unchanged). It now builds a proper separate Funcall with the separator kwarg, matching the DSL/Stdlib behavior.

Round-trip pinned in generator_spec (behavior equality through the Interpreter, including both kwargs forms).

With py#7: the dsl_stage Python directive legs go green (18 → 15 remaining failures locally, all in the any/alias/capture vocabulary cluster).

…rate separator

The grammar's string-case directive accepts an optional kwarg list
after title_case; DocumentBuilder passes the kwargs through and the
NodeAdapter forwards them into the Funcall. Isc::Generator emits
separate/title_case with their kwargs.

Also fixes the adapter's separate conversion: it emulated the
directive as a space-to-separator substitution, which cannot produce
the real semantics (join every codepoint with the separator) — a
round-tripped separate silently did nothing on space-free input. It
now builds a proper separate Funcall with the separator kwarg.
@ronaldtse
ronaldtse merged commit a72845e into main Sep 29, 2026
6 of 24 checks passed
@ronaldtse
ronaldtse deleted the feat/kwargs-directives branch September 29, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant