Width and height argtypes, kdesc --argtypes from ref/, txt @define/@left_right/@columns, kdiag --check value validation (from dev d6993110e9b3)

Also: the klammertext argtype (descriptions kept as source), txt table
wrapping and :hpos/:offset, @c between ‹ ›, txt section headings, the
ktext newline-only trim, capitalize(), and the argtype test suite.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
ackandClaude Fable 5.1 committed 2026-09-16 16:59:49 +02:00
1 parent 9b0d0d7897
commit 0ead40f272
39 files changed
+734 -158

No files matched your search

+6 -1
View File
@@ -13,7 +13,10 @@
Parameter_set& Argtype_registry::parameters()
{
static Parameter_set instance("name | desc :pattern .* :python_cast str :default :alone");
// desc.klammertext: the description is Klammertext, kept exactly as
// written (Argtype::m_desc) for a Machine to render -- kdesc's listing,
// the Handbook. Plain-text displays (an argument error) unquote it.
static Parameter_set instance("name | desc.klammertext :pattern .* :python_cast str :default :alone");
return instance;
}
@@ -205,6 +208,8 @@ std::string Argtype_registry::describe(bool long_form, int indent_width) const
int pat_width = name_width + 2 + indent_width + label.size();
result << indent << std::setw(name_width) << name << sp_arrow;
if (long_form) {
// The stored text, as written: this is the programmer's dump
// (kdiag --machine), and a quoted "^@" in it is the fact.
result << m_types.at(name).m_desc << "\n";
result << std::setw(pat_width) << "regex: " << m_types.at(name).m_symbolic_pattern;
if (m_types.at(name).m_symbolic_pattern != m_types.at(name).m_pattern)