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

+13 -2
View File
@@ -27,6 +27,7 @@ public:
Argtype get(const std::string& name, const Locator& loc) const;
std::string eval(const std::string& value, const std::string& type_name, const Locator& loc);
std::string describe(bool long_form=false, int indent_width=4) const;
inline bool is_defined(const std::string& name) const {
@@ -51,7 +52,7 @@ std::vector<std::tuple<std::string, std::string, std::string, std::string, modif
R"([^\s]+)", "str",
pyformat_string },
{ "bool", "a Boolean value of 'false', 'False', '0', 'true', 'True', or '1'",
{ "bool", "a Boolean value of @c false c@, @c False c@, @c 0 c@, @c true c@, @c True c@, or @c 1 c@",
R"(0|1|true|false|True|False)",
"(lambda b : True if b not in {'0','false','False'} else False)",
pyformat_bool },
@@ -82,11 +83,21 @@ std::vector<std::tuple<std::string, std::string, std::string, std::string, modif
{ "rest", "the remaining arguments as a list nested to N dimensions "
"(rest(N)); the delimiter for dimension n is a run of n bar "
"characters, so | separates elements and || lists of elements",
"characters, so ^| separates elements and ^|^| lists of elements",
R"((?:.|\n)*)", R"((lambda s : __import__("kutil").rest_split(s, N)))",
nullptr },
{ "literal", "literal text passed without interpretation",
R"((?:.|\n)*)", "str",
pyformat_string },
// Klammertext SOURCE, exactly as written -- quoting carets included --
// for a parameter whose value will be handed to a Machine to render
// later (an @@@argtype's description). Unlike "literal", whose content
// has its "^" forms processed as the value is built, this keeps them:
// "^@date" stays "^@date", so it re-reads as the text "@date" rather
// than as a klammer application. (2026-09-13)
{ "klammertext", "Klammertext source, kept exactly as written",
R"((?:.|\n)*)", "str",
pyformat_string },
};