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:
1 parent
9b0d0d7897
commit
0ead40f272
39 files changed
+734
-158
No files matched your search
+11
-2
@@ -414,7 +414,16 @@ Parameter_set::value_map(
|
||||
check_positional(positional, loc);
|
||||
for (size_t i = 0; i < m_positional.size(); ++i) {
|
||||
auto param = m_positional[i];
|
||||
std::string arg = as_string(positional[i].begin(), positional[i].end(), true);
|
||||
// A "klammertext" parameter holds Klammertext SOURCE -- the text as
|
||||
// written, quoting carets included -- so that whoever displays it can
|
||||
// hand it to a Machine (an @@@argtype's description, 2026-09-13).
|
||||
// The katomizer strips the caret of a quoted special into m_text, so
|
||||
// the plain join would turn "^@date" into "@date", which re-reads as
|
||||
// a klammer application. A "literal" parameter keeps the plain join:
|
||||
// its "^" forms ARE processed (a "^@" in @c prints "@").
|
||||
std::string arg = param.m_argtype.m_name == "klammertext"
|
||||
? as_source(positional[i].begin(), positional[i].end(), true)
|
||||
: as_string(positional[i].begin(), positional[i].end(), true);
|
||||
values[param.m_name] = arg;
|
||||
}
|
||||
auto optional_values = check_optional(optional, loc);
|
||||
@@ -483,7 +492,7 @@ void Parameter_set::validate(
|
||||
// A .k description is prose: collapse its source layout (line
|
||||
// breaks, continuation indentation) so it re-flows with the
|
||||
// sentence -- indented .k lines would otherwise read as verbatim.
|
||||
<< collapse_whitespace(argtype.m_desc) << "\n";
|
||||
<< collapse_whitespace(unquote_punctuation(argtype.m_desc)) << "\n";
|
||||
throw Argument_error(ss.str(), loc);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user