uncurses/ansi/ascii.rs
1//! Printable ASCII boundary constants used by the ANSI scanner.
2//!
3//! ## Category
4//!
5//! This module names the non-control byte at the start of the printable ASCII
6//! range and the `DEL` byte at the end of the 7-bit control area. These values
7//! are useful when classifying bytes before parsing CSI, OSC, DCS, and other
8//! escape-sequence families.
9//!
10//! ## Conventions
11//!
12//! Constants are raw byte values, not escape sequences. `SP` is the literal
13//! space byte (`0x20`); `DEL` is the single-byte delete control (`0x7f`).
14//!
15//! ## Mode interaction
16//!
17//! These bytes are independent of terminal modes. Higher-level modules such as
18//! [`crate::ansi::text`] decide whether neighboring bytes form 7-bit (`ESC [`)
19//! or 8-bit (`0x9b`) control sequences.
20
21/// Space byte `0x20`, the first printable ASCII code point and the separator often used inside CSI parameter syntax as an intermediate byte.
22pub const SP: u8 = 0x20;
23/// Delete control byte `0x7f`, the last 7-bit ASCII byte. It is treated as a standalone control byte by the tokenizer.
24pub const DEL: u8 = 0x7F;