Implement native paragraph token naming and execution contexts

This commit is contained in:
gloamxun committed 2026-11-21 01:49:10 +08:00
1 parent 862801ee5f
commit 13ab32247d
12 files changed
+118 -24

No files matched your search

@@ -169,7 +169,16 @@ impl Executor {
) -> Result<(), Error> {
match boundary {
Boundary::Prefix => unreachable!("prefix boundary is handled by raw"),
Boundary::Entry => self.finish_alignment_column(files),
Boundary::Entry => {
if self.alignments.last().is_some_and(|frame| !frame.horizontal)
&& self.in_unrestricted_horizontal_mode()
&& self.read_parameter(Parameter::Partokencontext).width() > 1
{
self.alignment_marker(Boundary::Entry)?;
return self.insert_paragraph_token(self.current);
}
self.finish_alignment_column(files)
}
Boundary::Peek => self.peek_alignment(files),
}
}
@@ -788,7 +788,7 @@ impl Executor {
| Scriptscriptfont | Endlinechar | Newlinechar | Escapechar | Globaldefs | Time
| Day | Month | Year | BeginGroup | EndGroup | Relax | Message | Errmessage
| Endinput | Showbox | Show | Showthe | Discretionary | DiscretionaryHyphen
| Parshape => {
| Parshape | Partokenname => {
return Ok(false);
}
_ => return self.fail(format!("unsupported native math primitive: {p:?}")),