pub enum BalancedBoundary {
Transparent,
Opaque,
}Expand description
What a balanced read (read_balanced) does when it exhausts a mouth before
the braces balance.
Perl has no such distinction: Gullet.pm L465-472 reads $$self{mouth} ->readToken() — the current mouth only — and lasts at the boundary, so
every Perl mouth is Opaque. Rust crosses the
boundary for token-level injections, which is a deliberate surpass-Perl
divergence (xint, see read_balanced) and must stay narrow: crossing from a
mouth that is its own input lets one runaway argument swallow everything
after it.
Variants§
Transparent
The mouth is a token-level continuation of the enclosing stream
(\scantokens, RawTeX): its } may legitimately live in the parent, so a
balanced read drains it and resumes there.
Opaque
The mouth is a self-contained input. A balanced read stops at its end, as Perl always does — an unbalanced argument loses the rest of this mouth and nothing more.
Trait Implementations§
Source§impl Clone for BalancedBoundary
impl Clone for BalancedBoundary
Source§fn clone(&self) -> BalancedBoundary
fn clone(&self) -> BalancedBoundary
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more